Created
January 30, 2012 09:54
-
-
Save dropmeaword/1703634 to your computer and use it in GitHub Desktop.
Wordpress Event Type listings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- lf: begin: list agenda event --> | |
<?php | |
query_posts(array('meta_key' => 'agenda_begins', 'orderby' => 'meta_value', 'post_type' => 'event', 'showposts' => 5)); | |
if (have_posts()): | |
?> | |
<section class="agenda"> | |
<h1><?php _e('Upcoming events'); ?></h1> | |
<dl class="eventListings"> | |
<?php while(have_posts()): the_post(); ?> | |
<dt><a class="eventTitle" href="<?php the_permalink() ?>"><?php the_title(); ?></a></dt> | |
<dd><?php echo get('agenda_begins'); echo'___'; echo get('agenda_ends'); echo ' '; echo get('venue_name'); ?></dd> | |
<dd> | |
<?php echo preg_replace('/<p>(.+?)<\/p>/','$1',get_the_excerpt()); ?> <a href="<?php the_permalink() ?>" class="more-link"><?php _e('Read more', 'ia3'); ?><span class="implied"> – ‘<?php the_title(); ?>’</span>.</a> | |
</dd> | |
<?php endwhile; wp_reset_query(); ?> | |
</dl> | |
</section> | |
<?php endif; ?> | |
<!-- lf: end: list agenda event --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment