• Hi Guys,

    Strange category issue here, and can’t seem to find an answer anywhere. Apologies if this exists elsewhere.

    Here’s what’s happening.
    1. I have several categories created several WP versions ago what work just dandy.

    2. If I try to rename the title (not touching the slug) of one of my existing categories, it will stop displaying posts when I view it on the website.

    I can still see the new category name associated with posts in the Posts admin screen…it just doesn’t show any of those assigned posts when I click it on the website, as if there were no assigned posts.

    The very odd thing is that there is still a link to comments for the category, and if you hover over it…it’s the comment link for the first post that SHOULD be showing up under the category…but nothing else is on the page.

    3. Same thing happens with new categories. Create new category, assign posts to it, view cat on website…no posts display (except for comment link to the top post that SHOULD display)

    I’m at a loss on this one, and about to start diving into the php code. Any insight would be amazing, even just a point in the right direction.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the Twenty Ten theme to rule out any theme-specific problems.

    Thread Starter mikeam27

    (@mikeam27)

    Thanks for the reply!

    1. Deactivating all plugins didn’t make a difference to the archives page.

    2. Switching to the twenty-ten theme actually helped a little bit. It at least showed the full excerpt for the one post in the category that seems to display, instead of just the comment link.

    But still, only that one post pulls. I’m showing 22 posts assigned that category in WP admin. It’s almost like it’s just pulling the first post, or just pulling the last post.

    Also, if I go into archive.php and try to echo something in the “while have_posts()” loop it won’t display. ??

    Any other ideas?

    Does WP store categories anyplace beside the term_ tables?

    Thread Starter mikeam27

    (@mikeam27)

    Update: I was able to mess with archive.php and get it to show the full excerpt for only one item in the category, as the TwentyTen theme was doing. So now my theme seems to operate the same as teh TwentyTen theme, which suggests all theme issues are resolved.

    And yet. Still only one post per category shows. It’s like it’s doing a query that has a limit=1 on it. If I un-associate one of the 22 posts in the category, it will show another one of the remaining 21, but only one at a time.

    UPDATE2: Now that I’ve made my theme work as well as TwentyTen, all the categories are broken instead of just my new ones. Note by “broken” I mean they only display one post instead of all of them. So at least it’s consistent now.

    There has got to be a query somewhere limiting the posts pulled. But if it’s not in my theme, I don’t know where that could be. Any ideas?

    Thread Starter mikeam27

    (@mikeam27)

    SOLVED: Got it. There was a limit=1 on my posts query, I just had to dive into the wp codex docs to figure out how to echo the query string.

    Ultimately, for anyone else who has this problem, this is the fix:
    query_posts($query_string.'&posts_per_page=50');

    FWIW: I also created a separate category.php file to do this in instead of trying to work it into archive.php. I wanted a separate category display file anyway, and this made me a bit more bold with testing.

    Thanks for the help, esmi!

    How do I mark this as resolved?

    I have the same problem on my site. The categories link are showing the same as index.php, and not the category.php file.

    Does anyone know how to solve this in version 3.1? Thanks for your help.

    Thread Starter mikeam27

    (@mikeam27)

    Hi estereofonico,

    In my case, the thing that helped me most was finding out how to view the wpquery string, so I could see what was going on and modify.

    If I remember correctly, I just spit out the whole object like this…
    print_r($wp_query);

    And the query string like this…

    global $query_string;
    
    echo $query_string;

    Also, this graphic of the wordpress file structure was helpful…
    https://wpcandy.com/files/2008/04/wp-diagram.jpg

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Assigned posts do not display on site for new categories?’ is closed to new replies.