Revision: 32158
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 19, 2010 23:30 by hussong
Initial Code
<?php $today = date ('Y-m-d'); ?>
<?php query_posts('cat=6&showposts=5&meta_key=event_date&meta_compare=>=&meta_value='.$today.'&orderby=meta_value&order=ASC'); ?>
<?php if ( have_posts() ) : ?>
<ul>
<?php while ( have_posts() ) : the_post(); ?>
<li class="cat-post-item"><a class="post-title" title="Permalink to <?php the_title() ?>" rel="bookmark" href="<?php the_permalink() ?>"><?php the_title() ?></a></li>
<?php endwhile; ?>
</ul>
<?php endif; wp_reset_query(); ?>
Initial URL
Initial Description
Gets the date, pulls a list of upcoming events (posts from cat 6) and sorts by custom field \\\"event_date\\\" . Add to sidebar via [PHP Code Widget](http://wordpress.org/extend/plugins/php-code-widget/).
Initial Title
List upcoming Events in Sidebar via PHP Code Widget
Initial Tags
list, wordpress
Initial Language
PHP