Viewing file: sidebar.php (2.01 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php /** * @KingSize 2014 **/ ?> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Main Blog Sidebar") ) : ?> <!-- This sidebar will be shown if no widgets used -->
<!-- Sidebar item --> <div id="recent_posts" class="blog_section"> <h3>Categories</h3> <ul class="side-nav bg-hover"> <?php $categories_list = wp_list_categories('echo=0&title_li=&hide_empty=1'); echo str_replace('<li class="','<li class="divider"></li><li class="pencil ',$categories_list); ?> </ul> </div> <!-- Sidebar item ends here--> <!-- Sidebar item --> <div id="recent_posts" class="blog_section"> <h3>Recent Posts</h3> <ul class="side-nav bg-hover"> <?php wp_get_archives( array( 'type' => 'postbypost', // or daily, weekly, monthly, yearly 'limit' => 5, // maximum number shown 'format' => 'custom', // or select (dropdown), link, or custom (then need to also pass before and after params for custom tags 'show_post_count' => false, // show number of posts per link 'before' => '<li class="divider"></li><li class="pencil">', 'after' => '</li>', 'echo' => 1 // display results or return array
) ); ?> </ul> </div> <!-- Sidebar item ends here--> <!-- Sidebar item --> <div id="recent_comments" class="blog_section"> <h3>Archives</h3> <ul class="side-nav bg-hover"> <?php wp_get_archives( array( 'title_li=' => '', 'type' => 'monthly', // or daily, weekly, monthly, yearly 'format' => 'custom', // or select (dropdown), link, or custom (then need to also pass before and after params for custom tags 'show_post_count' => false, // show number of posts per link 'before' => '<li class="divider"></li><li class="pencil">', 'after' => '</li>', 'echo' => 1 // display results or return array
) ); ?> </ul> </div> <!-- Sidebar item ends here--> <?php endif; ?>
|