Advertisement
turiyamoore

sidebar.php

Nov 17th, 2011
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Sidebar containing the primary and secondary widget areas.
  4. *
  5. * @package WordPress
  6. * @subpackage Twenty_Ten
  7. * @since Twenty Ten 1.0
  8. */
  9. ?>
  10.  
  11. <div id="primary" class="widget-area" role="complementary">
  12. <ul class="xoxo">
  13.  
  14. <?php
  15. /* When we call the dynamic_sidebar() function, it'll spit out
  16. * the widgets for that widget area. If it instead returns false,
  17. * then the sidebar simply doesn't exist, so we'll hard-code in
  18. * some default sidebar stuff just in case.
  19. */
  20. if ( function_exists( 'simple_sidebar' ) ) :
  21. simple_sidebar( 'primary-widget-area' );
  22. elseif ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
  23.  
  24. <li id="search" class="widget-container widget_search">
  25. <?php get_search_form(); ?>
  26. </li>
  27.  
  28. <li id="archives" class="widget-container">
  29. <h3 class="widget-title"><?php _e( 'Archives', 'twentyten' ); ?></h3>
  30. <ul>
  31. <?php wp_get_archives( 'type=monthly' ); ?>
  32. </ul>
  33. </li>
  34.  
  35. <li id="meta" class="widget-container">
  36. <h3 class="widget-title"><?php _e( 'Meta', 'twentyten' ); ?></h3>
  37. <ul>
  38. <?php wp_register(); ?>
  39. <li><?php wp_loginout(); ?></li>
  40. <?php wp_meta(); ?>
  41. </ul>
  42. </li>
  43.  
  44. <?php endif; // end primary widget area ?>
  45. </ul>
  46. </div><!-- #primary .widget-area -->
  47.  
  48. <?php
  49. // A second sidebar for widgets, just because.
  50. if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
  51.  
  52. <div id="secondary" class="widget-area" role="complementary">
  53. <ul class="xoxo">
  54. <?php dynamic_sidebar( 'secondary-widget-area' ); ?>
  55. </ul>
  56. </div><!-- #secondary .widget-area -->
  57.  
  58. <?php endif; ?>
  59.  
  60.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement