Might paste your index.php at a pastebin such as http://wordpress.pastebin.com/ and report the link back here.
Hi Michael, it’s not index.php, it’s single.php.
As requested, here’s the code from Paste Bin.
Thanks!
You have multiple loops in that code so assuming you want both you should use the rewind_posts template tag.
You mean the one at the top and the main one for the content?
I use the same thing on Blah without any problems and there’s no rewind template tag being used.
I’ve removed the loop from the top of the single.php file and it’s not changed anything.
Wonder if something in your sidebar.php is resetting your post loop?
If you change to the WordPress Default theme do you see the correct tags when viewing a single post?
Yes, changing the template does make the tags load properly.
Here’s the code for sidebar.php on Paste Bin
BTW, thanks for your help so far! Much appreciated…
See if this works in your sidebar.php: (didn’t test this)
replace
<?php global $post; $myposts = get_posts('numberposts=5'); foreach($myposts as $post): ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
with
<?php $recent= new WP_Query('numberposts=5');
while ($recent->have_posts()) : $recent->the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endwhile; ?>
Wayne what does the oil_am_Display(); function do? I don’t see anything weird in the sidebar file. What are the two loops actually accomplishing?
Hi Michael, the tags are still stuck, but this time they’re from a much earlier article. Also, it ignores the number of articles to be viewed in the query.
So the problem is clearly related to the Recent Articles, because when I take the code out, all is fine.
Hi Chris! That’s a function my Ask Me! Plugin uses.
But that’s been disabled, so it wouldn’t have done anything.
So right now, I’m using:
<?php foreach(get_posts('numberposts=5') as $post): ?>
li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<php endforeach; ?>
I just don’t know enough about WordPress to figure this one out, despite all my PHP know-how…
Sorry, the numberposts=5 should be showposts=5. But you might want to try a new WP_query on your other loops.
OK, doesn’t look like this is working.
I might have to scrap the recent articles code, or find some new code.