Want more features on Pastebin? Sign Up, it's FREE!
Guest

sidebar.php

By: alchymyth on Jun 7th, 2012  |  syntax: PHP  |  size: 0.48 KB  |  views: 52  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <div id="sidebar">
  2.         <ul>
  3.  
  4. <?php
  5.         if(is_page() && is_active_sidebar('sidebar-pages')) : dynamic_sidebar('sidebar-pages');
  6.     elseif(is_active_sidebar('sidebar-blog')) : dynamic_sidebar('sidebar-blog');
  7. else : ?>
  8.  
  9.         <?php wp_list_categories('title_li=<h2>Categories</h2>'); ?>
  10.        
  11.         <?php wp_list_pages('title_li=<h2>Pages</h2>'); ?>
  12.  
  13.         <li><h2>Archives</h2>
  14.                 <ul>
  15.                 <?php wp_get_archives(); ?>
  16.                 </ul>
  17.         </li>
  18.        
  19.         <?php wp_list_bookmarks(); ?>
  20.        
  21. <?php endif; ?>
  22.        
  23.         </ul>
  24. </div>
clone this paste RAW Paste Data