Always the same single post is shown
-
I created a custom post type with WordPress called “Members”. I just added two members:
1. John Miller
2. Mary SmithNo matter for which member I click on “View member” I always only see the page of the last member I added, which is Mary Smith. Also, when I enter the URL for my first member, John Miller, (www.example.com/?members=john-miller), I get Mary Smith as the result. How can this be?
In the single template file I have the following code structure:
<?php get_header(); ?> <?php query_posts('post_type=members'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <!-- content with content of custom fields in here --> <?php endwhile; endif; wp_reset_query(); ?> <?php get_footer(); ?>
- The topic ‘Always the same single post is shown’ is closed to new replies.