Advertisement
Guest User

Sidebar.php

a guest
May 9th, 2013
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.94 KB | None | 0 0
  1. <?php
  2. /**
  3. * The Sidebar
  4. */
  5. ?>
  6. <div id="sidebar">
  7. <div class="widget-block">
  8. <div class="widget-blockTop"></div>
  9. <div class="widget-blockMid">
  10. <?php
  11. /* When we call the dynamic_sidebar() function, it'll spit out
  12. * the widgets for that widget area. If it instead returns false,
  13. * then the sidebar simply doesn't exist, so we'll hard-code in
  14. * some default sidebar stuff just in case.
  15. */ ?>
  16. <ul style="padding:0;">
  17. <?php if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>
  18.  
  19. <li>Widget area. Put some widgets here through the Wp Backend -> Appearance -> Widgets</li>
  20. <?php endif; // end primary widget area ?>
  21. </ul>
  22. <div style="clear:both;"></div>
  23. </div>
  24. <div class="widget-blockBot"></div>
  25. </div>
  26.  
  27. <!-- this menu is page specific, will display all sub menu depending on the page. will be hidden on homepage -->
  28. <?php
  29. //$has_subpages = false;
  30. // Check to see if the current page has any subpages
  31. //$children = wp_list_pages('&child_of='.$post->ID.'&echo=0');
  32. //if($children) {
  33. // $has_subpages = true;
  34. //}
  35. // Reseting $children
  36. //$children = "";
  37.  
  38. // Fetching the right thing depending on if we're on a subpage or on a parent page (that has subpages)
  39. //if(is_page() && $post->post_parent) {
  40. // This is a subpage
  41. // $children = wp_list_pages("title_li=&include=".$post->post_parent ."&echo=0");
  42. // $children .= wp_list_pages("title_li=&child_of=".$post->post_parent ."&echo=0");
  43. //} else if($has_subpages) {
  44. // This is a parent page that have subpages
  45. // $children = wp_list_pages("title_li=&include=".$post->ID ."&echo=0");
  46. // $children .= wp_list_pages("title_li=&child_of=".$post->ID ."&echo=0");
  47. //}
  48. ?>
  49. <?php // Check to see if we have anything to output ?>
  50. <?php // if ($children) { ?>
  51. <!--<div class="widget-block">
  52. <div class="widget-blockTop"></div>
  53. <div class="widget-blockMid">
  54. <h1 class="tsQ5"><img class="va-mid" src="<?php bloginfo('template_url'); ?>/assets/icon-links.png" width="26" height="25" alt="Login" /> Menus</h1>
  55. <ul>
  56. <?php echo $children; ?>
  57. </ul>
  58. </div>
  59. <div class="widget-blockBot"></div>
  60. </div>-->
  61. <?php // } ?>
  62.  
  63.  
  64. <!-- <li><a href="<?php bloginfo('url'); ?>">Lifelong Learners</a></li>
  65. <li><a href="<?php bloginfo('url'); ?>">Targeted Learners</a></li>
  66. <li><a href="<?php bloginfo('url'); ?>">Breaking Barriers Learners</a></li>
  67. <li><a href="<?php bloginfo('url'); ?>">Community Learners</a></li>
  68. <li><a href="<?php bloginfo('url'); ?>">Foundation Learners</a></li>-->
  69.  
  70.  
  71.  
  72. <div class="widget-block2">
  73. <div class="widget-blockTop"></div>
  74. <div class="widget-blockMid">
  75. <h1 class="tsQ5"><img class="va-mid" src="<?php bloginfo('template_url'); ?>/assets/icon-news.png" width="26" height="25" alt="Login" /> Latest News</h1>
  76. <ul>
  77. <?php
  78. query_posts('cat=1&showposts=5&orderby=date&order=DESC');
  79. while(have_posts()) { the_post();?>
  80. <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
  81. <?php } ?>
  82. </ul>
  83. </div>
  84. <div class="widget-blockBot"><a href="<?php bloginfo('url'); ?>/news">more news <img src="<?php bloginfo('template_url'); ?>/assets/arrow.png" width="4" height="6" alt="&gt;" /></a></div>
  85. </div>
  86. <div class="widget-block2">
  87. <div class="widget-blockTop"></div>
  88. <div class="widget-blockMid">
  89. <h1 class="tsQ5"><img class="va-mid" src="<?php bloginfo('template_url'); ?>/assets/icon-events.png" width="26" height="25" alt="Login" /> Professional development</h1>
  90. <?php $postslist = get_posts('category=3&numberposts=3&orderby=date=DESC');
  91. foreach ($postslist as $post) : setup_postdata($post);
  92.  
  93. //query_posts('cat=3&showposts=3&orderby=date&order=ASC');
  94. //while(have_posts()) { the_post();
  95. //$eventmth = get_post_meta($post->ID, 'EventStartMonth', $single = true);
  96. //$eventday = get_post_meta($post->ID, 'EventStartDay', $single = true); ?>
  97. <div class="event-items">
  98. <h2 class="event-title"><a href="<?php the_permalink(); ?>">
  99. <?php the_title(); ?>
  100. </a></h2>
  101. <span class="event-duration"><span class="event-duration-inner"><?php echo the_event_start_date('','false','d M, Y').' - '.the_event_end_date('','false','d M, Y'); ?></span></span>
  102. <div class="event-summary">
  103. <?php the_excerpt_rereloaded('20','','<strong><em>','div','yes'); ?>
  104. </div>
  105. </div>
  106. <?php endforeach;//} ?>
  107. </div>
  108. <div class="widget-blockBot"><a href="<?php bloginfo('url'); ?>/events">more events <img src="<?php bloginfo('template_url'); ?>/assets/arrow.png" width="4" height="6" alt="&gt;" /></a></div>
  109. </div>
  110. </div>
  111.  
  112. <div class="clear"></div>
  113.  
  114. </div>
  115. <!-- FILE sidebar.php -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement