Wordpress post showing in my Home page
- by kwek-kwek
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