Automatically select parent categories when subcategories are selected.

  1. ravasthi


    My other submission failed, so I'll try again.

    I'd like for parent categories to automatically be selected when a child category is selected. They can of course be removed later by the user, but I think that for the most part, users will want parent categories to be selected when child categories are.

    Posted: 10 years ago #
  2. Mark


    If you mean that the parent category for an active child category should get a class like current_cat_ancestor, I fully agree. This is missing functionality which definitely should be there. Currently it can only be accomplished by a plugin ('fold categories') or by some quite simple hacks to core files. This would be no more than a logical extension of the current funtionality which provides the active page with the class current_page_item, and as such should definitely be fixed in the core.

    (Incidentally, the same holds for pages: parent pages of active child pages should get a class like current_page_ancestor.)

    Posted: 10 years ago #
  3. Mark


    Hmm, on reading again, I think I misunderstood you. Sorry!

    Posted: 10 years ago #

  4. Inactive

    I am running 2.51 at have the same problem...

    1) If you choose a sub category and save...

    2) There will be no count for a post on the main Category widget!

    3) You have to select the Main category your self....

    Should be logical that it choose the Upper category automatically

    Posted: 9 years ago #

  5. Inactive

    Solution is here:



    Posted: 9 years ago #
  6. Aw Guo


    Take a look at this plugin, maybe it's what you needed :)

    Posted: 9 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    52 Votes
  • Status

    This is plugin territory