Option to Show/Hide empty (sub)categories in Main Navigation

Requests for new features. You cannot post to this forum because new feature requests are not accepted any more.
Forum rules
New feature requests are no longer accepted, so you cannot post to this forum any more.
Locked
Ampton
Posts: 8
Joined: 22 Apr 2010, 02:35

Option to Show/Hide empty (sub)categories in Main Navigation

Post by Ampton » 22 Apr 2010, 02:55

Hi,

I help a friend to develop its blog and we encounter a problem in our Main Navigation Menu.
We used the Main Navigation menu feature, to display Pages and Categories with a Drop Down menu.

For the page, it works really good -> Top level pages and child pages are displayed correctly.
For the categories, well, many are missing.

The blog is about a collection of objects, there are many categories and subcategories created to reflect "nomenclature" of the collection. Example: A car category could have subcategories like luxury car, electric car, ... Each subcategories could also have subcategories and so one. Example: luxury car could have Jaguar, Ferrari, Mercedes, ...
A post, reflecting an object of the collection, is assigned to a specific (sub-)category. For example, Mercedes.
This means than in our hierarchy of categories, we will have this:
  • Car (0 post)
    • Luxury car (0 post)
      • Jaguar (0 post)
      • Ferrari (0 post)
      • Mercredes (1 post)
    • Electric car (0 post)
Suffusion filters categories which are empty, meaning no post directly attached to it.
It does not consider the category inheritance of a post.

To fix this problem, I edited the core theme functions to add the parameter 'hide_empty' => false where it's required to fix the problem. (I can give more informations if required).
However, I think that it could be great to:
  • add a feature allowing the end-user to allow the empty (sub-)categories to be shown
  • check the post's category inheritance --> WordPress feature ?
I hope than my explanation was cleared enough. If not, feel free to ask more information.
Ampton.

PS: Sorry if my english is not so good, but it's not my mother language ;)

User avatar
Connie
Posts: 1169
Joined: 10 Nov 2009, 04:53
Contact:

Re: Option to Show/Hide empty (sub)categories in Main Navigation

Post by Connie » 22 Apr 2010, 03:56

I would suggest to write a small post for each category to explain the subject of that category.

By this you omitt empty menue-branches and develop a kind of glossary as well.

Locked