Is there a function to cause empty categories not to show in menus?

Scenario: Clients can add or remove posts at will, but may not be comfortable (or even bother) adding categories to a menu.

Problem: This can cause empty categories to be displayed in menus.

Question: Is there a core function or resource that can be called from functions.php that will cause empty categories not to show on the front side even if they are showing as added in the dashboard.

Previous research: I have searched in both Google and this StackExchange for an answer. I may not be finding it by using the wrong search terms.

Read more here:: Is there a function to cause empty categories not to show in menus?

Leave a Reply

Your email address will not be published. Required fields are marked *