Page 1 of 1

Please please help! (should be an easy fix)

Posted: Thu Aug 27, 2009 2:12 pm
by Joe Crogan
Hi all (my first post),

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. I use the same code which is used on single.php and archive.php and it works perfectly.

However on my homepage, whatever category the 1st post at the top of the page has it converts all the rest posts to the same category. Similarly, If I click on the comments link of a lower post on my homepage it is linked to the first post. Again, this doesn't happen inside archives or any other 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 cat.

Hope all this makes sense! A million thankyous to anyone that can help!!!

http://www.joecrogan.com

Re: Please please help! (should be an easy fix)

Posted: Thu Aug 27, 2009 5:49 pm
by Darhazer
Without some code it will be really hard to help you.
The problem can be in the SQL query, if it returns wrong data for the categories, or in some variable...

Re: Please please help! (should be an easy fix)

Posted: Thu Aug 27, 2009 9:48 pm
by califdon
Your Subject line is: Please please help! (should be an easy fix)

You will find that most of the people who might be able to help you will ignore your post. I'm surprised that I bothered to read it, myself. Do yourself a favor and edit your Subject line so that it suggests what your problem is. Most of us scan the Subject lines and only read those where we think we can help. And, as Darhazer said, we can't even begin to help you find a problem with your code if we can't see your code. If you post code, PLEASE use the appropriate BBCode tags that make it easier to read code. Assuming that you post PHP code, surround your code listing with

Code: Select all

 ... [/Code ] tags (don't include spaces, I did that so they wouldn't be interpreted here).

Re: Please please help! (should be an easy fix)

Posted: Thu Aug 27, 2009 10:16 pm
by tabitha
You're using WP, but you're using a WooThemes template, have you contacted support?

Here's a link their help forum: http://forum.woothemes.com/

I would first backtrack and disable any new plugins you've added recently, and then check your while loop. Really though, what everyone else said applied, without looking at the code, it's impossible to see what's wrong.

Re: Please please help! (should be an easy fix)

Posted: Sat Aug 29, 2009 8:32 am
by Joe Crogan
The following is the code on for my hompage.php.
The code in red is the same on archive.php and single.php (both of which work perfectly).

<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<p><em>by <?php the_author()?></em></p>
<p><?php echo strip_tags(get_the_excerpt(), '<a><strong>'); ?></p>
<p><span class="continue"><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>">Read the full story</a></span></p>

<h3 class="posted">Posted in <?php the_category(', ') ?><span class="comments"><?php comments_popup_link('Comments (0)', 'Comments (1)', 'Comments (%)'); ?></span></h3>


My homepage used to work fine. But since I changed the category names this problems seems to have occurred. 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! ???