I created a custom taxonomy as category and display it by wp_nav_menu. The problem is, so far there are some terms in the custom taxonomy has no post attached to it, but it still show in the menu. So when people click on the menu link, they will got to a Nothing Found page.
How do I display the menu/term that only has post in it in wp_nav_menu?
<?php wp_nav_menu( array( 'menu' => 'custom_tax', 'menu_class' => '', 'container' => 'catmenu','items_wrap' => '%3$s') ); ?>in my theme,I couldn't found any hook for this.