[EventCalendar] Re: Hiding Events From Recent Posts

Joni Mueller (Pixelita Designs) joni at pixelita.com
Mon Mar 10 15:48:14 UTC 2008



>Message: 1
>Date: Sun, 9 Mar 2008 22:24:36 -0400
>From: Alexander Covan <alexc at sepiastudios.com>
>
>So far, I love this plug-in but have 1 question.
>Is it possible to exclude "events" from "recent posts" in the sidebar?
>

Just put this code in your sidebar and substitute the category ID for
your own event category, mine was ID 10 so I have it "-10":

<li id="recent_entries_noevent">
<h2><?php _e('Recent Entries'); ?></h2>
<ul>
<?php $temp_query = $wp_query; query_posts('showposts=10&cat=-10'); ?>
<?php while (have_posts()) { the_post(); ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark"
title="Permanent Link to &ldquo;<?php the_title(); ?>&rdquo;"><?php
the_title(); ?></a></li>
<?php } $wp_query = $temp_query; ?>
</ul>
</li>





More information about the EventCalendar mailing list