Advertisement
dangrgal

sidebar_events

Aug 9th, 2011
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. <h3 class="sbh3">Events</h3>
  2.  
  3. <?php
  4. $args=array(
  5. 'post_type' => 'events',
  6. 'post_status' => 'publish',
  7. 'posts_per_page' => 3,
  8. 'caller_get_posts'=> 1
  9. );
  10. $my_query = null;
  11. $my_query = new WP_Query($args);
  12. if( $my_query->have_posts() ) {
  13. while ($my_query->have_posts()) : $my_query->the_post(); ?>
  14. <span class="sidebarlink"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></span><br />
  15. <?php echo events_meta($when); ?><br />
  16. <?php the_excerpt(); ?><br />
  17. <?php
  18. endwhile;
  19. }
  20. wp_reset_query(); // Restore global post data stomped by the_post().
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement