WordPress.org

Ready to get started?Download WordPress

Forums

An upcoming events list (1 post)

  1. scrambled
    Member
    Posted 3 years ago #

    Here's what I'm using: http://www.problogdesign.com/wordpress/how-to-make-a-wordpress-events-list/

    Here's the code:

    <?php // Get today's date in the right format
    $todaysDate = date('m/d/Y');
    ?>
    
    <?php query_posts('showposts=4&category_name=events&meta_key=date&meta_compare=>=&meta_value=' . $todaysDate . '&orderby=meta_value&order=ASC'); ?>
    
    <ul>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <li>
    	<span class="event-title"><?php echo get_post_meta($post->ID, "date", true); ?> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></span> <span class="event-excerpt"><?php the_excerpt(); ?></span>
    </li>
    <?php endwhile; else: ?>
    <li>Check back soon for more upcoming events!</li>
    <?php endif; ?>
    <li><a href="/calendar">More events</a></li>
    </ul>
    <?php wp_reset_query(); ?>

    But as of Jan. 1, events from 2010 are showing up as future events? Any ideas why? See: http://bit.ly/e3aqNy for live example

Topic Closed

This topic has been closed to new replies.

About this Topic