Hide empty category from menu
-
Hi,
I made a lot of empty categories which will be filled later.
I added the empty categories in the “menu” in the Back-End admin.
The menu works well in the Front-End but….Because the most categories are still empty I wonder if there is a way to hide the empty categories from the Front-End?
I would like my customers to give them only “Editor” rights so they don’t see the “theme options MENU” in the wp-admin. I don’t want to give them the rights to change the menu.
Is it possible to exclude empty categories in the menu?
Thanks in advance,
Alfred
-
Hi esmi,
Thank you, I think I know how to do this for a category (hide_empty=1)
But I need it for the new WordPress 3 feature (http://codex.ww.wp.xz.cn/Appearance_Menus_SubPanel).
So I have added the empty categories in this subPanel and would like them only to show in the Site (front-end) when there is post in a category.
I don’t know in which php file to write the hide_empty code.
Can you or someone help me with this? Or tell me if it is possible
Thanks again,
AlfredIf you’ve added a link for a category to a custom menu, you can’t then dynamically hide it “on empty”. Just don’t add these links to your custom menus(s) unless you have at least 1 post in the relevant category.
Hi Esmi,
Thank you. That’s a pitty.
I had hoped that I didn’t have to give my client a “Admin” role because that is the only way to add or remove menu-items.
Because this way my client has too much admin rights and i don’t want my client to be able to update a plugin or install an update for wordrpress. It would be nice when empty categories (by default not showing when they have no post) also don’t show up when empty in the menu.But thanks for your replay,
Alfred
The topic ‘Hide empty category from menu’ is closed to new replies.