Wordpress post showing in my Home page

Posted by kwek-kwek on Stack Overflow See other posts from Stack Overflow or by kwek-kwek
Published on 2010-05-04T14:57:02Z Indexed on 2010/05/04 14:58 UTC
Read the original article Hit count: 247

Filed under:
|
|

I am setting up an eventlist for wordpress here is my code:

<?php
    $todaysDate = date ('M d');
    $event_query = query_posts('showposts=5&category_name=events&meta_key=Date&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_value=order=ASC');
?>
<?php
    if (have_posts()) : while (have_posts()) : the_post();
    $eventMeta = get_post_meta($post->ID, 'Date', true);
    $eventDate = strtotime($eventMeta);
    $displayDate = date ('M d', $eventDate);
?>
<li>
<span class="date"><?php echo $displayDate ; ?></span>
<span><a href="<?php the_permalink();?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></span></li>
<?php endwhile; else:?>
<li>No Upcoming events</li>
<?php endif;?>

Now the problem is that the post shows under my home content and when you click on the post under "nouvelles" it goes to a different entry.

view the site

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about wordpress-theming