WordPress.org

Ready to get started?Download WordPress

Forums

Why are my categories not displaying? (18 posts)

  1. alpha
    Member
    Posted 9 years ago #

    Hi, everyone
    Just recently made the move from Blogger to self-hosted blogging and my choice is WordPress. After trying other solutions, I have no regrets about choosing WP.
    Now, I've been tweaking my templates to my liking and my posting categories are not posting on my blog. I do not know if this feature worked before I edited my sidebar and placed the categories at the top of the page. Did I do something wrong?
    If anyone can have a look and tell me how to fix this I'd appreciate it. I've searched for an answer to no avail.
    Thanks.
    http://theomegaattempt.com

  2. Root
    Member
    Posted 9 years ago #

    Cats need a post in them to show up. No problem. Welcome to WP.

  3. alpha
    Member
    Posted 9 years ago #

    See, the latest post was placed in two different categories and neither of them are showing up... The only category that shows up is "General"... and the post was not placed in that category.

  4. Root
    Member
    Posted 9 years ago #

    What version of WP are you running ?

  5. alpha
    Member
    Posted 9 years ago #

    I'm running 1.2 Any thoughts?

  6. Anonymous
    Unregistered
    Posted 9 years ago #

    I have restored the index.php file to see if something I did to it made the categories not display but they still don't show up.
    This one has me really stumped. Any help is appreciated.

  7. happystinky
    Member
    Posted 9 years ago #

    I'm having the same issue. Just installed wordpress yesterday (vsn 1.2). Only 'general' category shows up. I have 20 cats, give or take and have posted in several of them but they are still not showing??? HELP!!! Thanx

  8. alpha
    Member
    Posted 9 years ago #

    I just installed a fresh installation of WP in another directory (completely unmodified) and they still don't show up.
    I can't believe that we're the only people with this issue...

  9. Anonymous
    Unregistered
    Posted 9 years ago #

    You're not the only ones!
    I have had the same problem and thought it might be due to some template editing I had done - but now I'm not so sure it's my fault.
    I have seventeen categories - some empty except for the description but several with posts. The posts all show up and if I click on the category name associated with a post I get the appropriate selection, but only the general category is listed in the menu pane.
    The categories do show up ok on another install I did, on a server where php's dirname function didn't seem to be working and where I had to put the paths in by hand but where I didn't do any template editing. But in that case I only have two categories and in the problem case I have seventeen.

  10. happystinky
    Member
    Posted 9 years ago #

    Thanks!! I tried that and it works fine. Does that not seem like a bug to anyone else?

  11. acooper
    Member
    Posted 9 years ago #

    It might not be a bug to require all categories to be subcategories of 'General', but it is a bug *not* to (ie to allow such categories to be created) if the categories so created disappear without explanation from the menu.
    Anyhow, I'll try it and see what happens.

  12. acooper
    Member
    Posted 9 years ago #

    Well, I tried putting everything in 'General' and it did not actually solve my problem (posted as 'Anonymous' above). But without doing that I probably wouldn't have discovered the other issue.
    Making all categories subcategories of 'General' was a necessary step, but only part of the solution. It also turns out that not only do categories without posts not show up, but neither do any of their subcategories - even if these do contain posts!
    That sure looks like a bug to me, and in fact the whole idea of hiding categories with no posts seems unnecessary. It's easy enough to work around by adding a 'hello world' type of posting in each category, but I'd rather not have display a bunch of poorly motivated material in order to have the site work properly.

  13. alpha
    Member
    Posted 9 years ago #

    acooper, I had the same problem; after creating all my categories under "general", I made a test post to all categories and they didn't show up. I had to re-install WP and then backed up my main css files and my index files in order not to lose all my settings.
    It does work now though. Still, everything has to be under "general".

  14. gravity
    Member
    Posted 9 years ago #

    What should those of us using 1.3 nightlies do? There are no categories. even the first post is UnCategorized. Will the first Catergory we create act as a General? Or in the new version can we create multiple Zero level Categories without the loss of subcategories?
    Kind regards,
    Gravity

  15. Anonymous
    Unregistered
    Posted 9 years ago #

    I also encountered this problem. I found a solution that seems to work here:
    http://www.skippy.net/wordpress/customize.html
    Basically you should edit your index.php file in the "menu" section as follows in the menu section:
    Delete or comment out this line which no longer seems to work:
    <!-- <?php wp_list_cats(); ?> --> <!-- this does not seem to work any more... -->
    Replace it with '''one''' of these lines, depending on how you want to sort your listed categories:
    <?php list_cats(0, 'All', 'name'); ?> <!-- sort by name -->
    <?php list_cats(0,'All', 'id'); ?> <!-- sort by id -->
    Also, this fix does not seem to require you to re-categorize all
    categories under the "General" category.

  16. Anonymous
    Unregistered
    Posted 9 years ago #

    ok, here is the offending line that does not seem to work:
    <?php wp_list_cats(); ?>
    (since it was commented out of the wiki post...)

  17. TechGnome
    Moderator
    Posted 9 years ago #

    I'd like to note that wp_list_cats() works jsut dandy.... at least in 1.2 it works. The problem was from an "issue" that wp would only display categories ONLY if there was a post in it. It was further complicated by the fact that sub cats would only show IF there was a post in the PARENT category. BUT, there was an option (in both list_cats, and wp_list_cats) to show empty categories.
    ala wp_list_cats : hide_empty - boolean - 0 or 1. 1 means hide empty categories (default is 1)
    ala list_cats : hide_empty - boolean - 0 or 1. 1 means hide empty categories (default is 1)
    By default WP hides empty categories. Since the parent cat was emtpy, the child ones were not being picked up. I don't know if this behavior has been changed in 1.3 or not.
    TG

  18. TechGnome
    Moderator
    Posted 9 years ago #

    I think it's supposed to be like this:
    wp_list_cats('hide_empty=0&categories=1,12,4,6,7,8,9');
    But I'm not sure....
    Tg

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.