I have a Wordpress site where we want to show Coming Events. We want simple solution with a category called Events and the event will be a post in that category - with the date set to a future date.
I have created a category template with the following code:
$my_query = new WP_Query('category_name=events&post_status=future&order=ASC');
while ($my_query->have_posts()) : $my_query->the_post();
$do_not_duplicate = $post->ID;
<h2 class="title entry-title"><?php the_title (); ?></h2>
<dd><?php the_excerpt(); ?></dd>
<?php endwhile; ?>
This is working to show the future-dated posts in the Events category as an excerpt. But when you click on 'read more' it gives a 404 error. This is because the post permalink is showing like /?p=2120 rather than the postname.
I need some help to get it working so when you click on 'read more' from the excerpt it will show the page correctly.