Hi, weird problem-when someone clicks on a post link, they see all the posts (in the "values" category, that is). Please see:
http://stevespets.com/
and click on one of the links on the left side.
Hi, weird problem-when someone clicks on a post link, they see all the posts (in the "values" category, that is). Please see:
http://stevespets.com/
and click on one of the links on the left side.
I think there's something seriously wrong in your theme as a whole. Many of the links on your top nav are pointing to files in /wp-content/themes/
Perhaps you need to review Theme_Development?
esmi, can you be more specific? I don't see any links with href's containing /wp-content/themes in the nav div...
My single.php file is as simple as can be:
<?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<h3><?php the_title(); ?></h3>
<?php the_content(); ?>
<?php endwhile; // end of the loop. ?>
and it's definitely being called by the single blog posts.
Oh, scratch that-I was mucking around and now the links are broken..hold on
http://stevespets.com/wp/wp-content/themes/steve/stevesvalues/
http://stevespets.com/wp/wp-content/themes/steve/smallanimals/
http://stevespets.com/wp/wp-content/themes/steve/fish/
http://stevespets.com/wp/wp-content/themes/steve/reptiles/
http://stevespets.com/wp/wp-content/themes/steve/birds/
http://stevespets.com/wp/wp-content/themes/steve/kittens/
All from your top nav bar (going from right to left).
OK, links are fixed-any ideas about why single.php isn't working?
Are you running more than one Loop using something like query_posts (perhaps in the sidebar)? That could be messing up the Loop in single.php - especially if you've forgotten to use wp_reset_query between the Loops.
Thanks esmi; I'm not using a sidebar per se, it's built into header.php:
Here's what I have there:
<?php
query_posts('category_name=values&showposts=5');
while (have_posts()) : the_post();?>
<div class="postEntry" >
<div class="date">
<?php the_date('m/d/y');?>
</div><!-- end date -->
<a href="<?php the_permalink();?>" title="<?php the_title(); ?>" class="title"><?php the_title();?></a>
<p><?php excerpt('25'); //content excerpt plugin function ?>
</div></p>
<?php endwhile; ?>That may be the problem. Ideally, you should be using get_posts for secondary Loops but you might be able to get away with simply using wp_reset_query() after the Loop in header.php.
Also have a look at this Codex page on multiple Loops.
Thanks esmi-that did it! I added wp_reset_query() right after endwhile; and now it's right on.
I'll definitely look over the codex, I need to get more familiar with this stuff...
Glad to have helped. :-)
This topic has been closed to new replies.