Hi all,
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. And finally, the "read the full story" on all posts are linked to the latest post as well. 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. As when I check inside my Category Nav bar, all posts are where they should be.
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. And I replaced /public_html/wp-content/themes/gazette-dev/gazette/includes/featured.php with the original version - Didn't work.
I hope this is all clear. If I am wording anything wrong, or you need any other code plez just shout.
A million thankyous to anyone that can help!
http://www.joecrogan.com