query_posts changes title tags
-
My site has a photo gallery. Each photo in the gallery is basically 1 post. Each posts gets lumped together to make the gallery.
I wanted to display the most recent photo on the homepage. This is the code I used below:
<?php query_posts('cat=71&showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <?php the_content('<p class="serif">Read the rest of this page »</p>'); ?> <?php endwhile;?>
It works fine except I just noticed that this code is changing the Title tags to that of the photo gallery page. When I remove this code It reverts to normal.
Any idea why this is happening? Should I modify this code code or something, or should I modify wp_title?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘query_posts changes title tags’ is closed to new replies.