WordPress.org

Ready to get started?Download WordPress

Forums

Empty category hidden even if there are posts in a subcat (5 posts)

  1. ralesk
    Member
    Posted 9 years ago #

    I’ve just spent some time trying to come up with a reason why some categories get hidden the moment I put them as subcats in a new category. I went through the source of WP (1.5.1.1, so hey, it might not be relevant in 1.5.1.2, but I doubt) to see if there are category limits or anything.

    There are no such things � there is instead a feature that empty cats are not shown. However, this does not take into count such circumstances when the parent cat is itself postless, but there are subcats of it which have posts.

    Other than that, I’m kind of missing cat-related options from the admin interface, but maybe that’s just lazy me.

    Sorry if this is a duplicate, I couldn’t find a related post with a quick skimming through the category category here.

  2. ralesk
    Member
    Posted 9 years ago #

    Oh yeah, I forgot: the questions.

    • How do I get around this? I speak some PHP, but I don’t feel comfortable with tinkering with WP’s innards, really.
    • How do I tell Development about this boog?
  3. LoneBoat
    Member
    Posted 9 years ago #

    This isn't a bump, really, but I'm interested in the solution to this as well. I've been looking and cannot seem to find the answer. If you find the solution, ralesk, please do tell...

    ::goes back to searching::

  4. LoneBoat
    Member
    Posted 9 years ago #

    Found it. When you call wp_list_cats(), you need to put the argument "hide_empty=0" in the parenthesis, along with any other arguments you are using...

    See this article on the codex...

    Let me know if you want/need some help doing this...

  5. ralesk
    Member
    Posted 9 years ago #

    Thanks, there :) I submitted the issue to the trac as well, as even with hiding on, the way it works now is a bug, I’m fairly sure.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags