My website (magazine style) has started to do something strange -
On my home page each post (excerpt) should have it's category listed underneath it along with how many comments. The exact same code is used on archive.php and it works perfectly.
However, on my homepage - this is not working. Whatever category my latest post is in (e.g. - currently 'Seagull Serious') the code converts all the other posts to the same category. Similarly, If I click on the comments link of any post on my homepage it is linked to the first post. Again, this doesn't happen inside archives.php pages.
I should probably stress, although they appear to be in the wrong category all the posts are still in the correct category. It is only a visual thing - where they appear to be in the wrong category.
The following is the code for my hompage -
The code in bold is for displaying the categories/comments and this is the same on archive.php (which works!)
<h2>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></h2>
<p>by <?php the_author()?></p>
<p><?php echo strip_tags(get_the_excerpt(), ''); ?></p>
<p><span class="continue">" href="<?php the_permalink() ?>">Read the full story</span></p>
<h3 class="posted">Posted in <?php the_category(', ') ?><span class="comments"><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></span></h3>
I got rid of all my widgets in my sidebar and nothing changed – so not them.
I am really confused as I have no idea what has caused this?!
A million thankyous to anyone that can help!