Okay, I figure it out.
Instead of using wp_nav_menu, I use wp_list_categories which has more parameters that we can control.
So to not display empty menu, I use:
<?php wp_list_categories(array('taxonomy' => 'custom_tax','hide_empty' => '1','title_li' => '')); ?>
the hide_empty
do the magic here.
Related Posts:
- Taxonomy menu with post count and multiple parents
- Taxonomy slug by term ID
- Custom taxonomy position in admin panel
- Custom metabox for menu administration page?
- How to display submenus on page based on referring top-level parent?
- Remove pagination from WooCommerce product categories on admin edit navigation menus
- How to dynamically add custom taxonomy terms as a sub-menu of an existing menu item, using custom walker class
- Recreating the hierarchy of taxonomies for a dropdown form menu?
- Date range filter for manage posts list on edit.php
- Get custom category image from menu
- add taxonomy as one of menu items
- has_term if/echo else/echo function
- Controlling Taxonomy Category listings to hide and unhide specifics
- Hide product categories and taxonomy terms in menu if empty
- How to add Post Format Taxonomy Archive page in the menu?
- How to get all taxonomies which can be added in menu?
- Customizing Primary Menu to include custom taxonomy description
- When filtering query on custom taxonomy; main menu dissapears
- Adding a custom taxonomy to “nav_menu_item”
- Corrupted nav-menu?
- Can I output a custom taxonomy as a submenu in the site navigation menu?
- Add A CSS Class To A Menu Item When A Custom Taxonomy Term is Present On Single Post
- custom taxonomies menu
- How to add all existing Custom Taxonomy to Admin Menu Creations Interface?
- WordPress Main Menu with dynamic url
- Get the original menu item name string instead of the label
- What is the current page’s Taxonomy?
- How to looping taxonomy terms?
- Get term name from term ID?
- Can custom taxonomies be displayed inside of a custom meta box?
- Front End Post Save Child terms
- Display child taxonomy until the last child
- URL rewrite rules for multiple taxonomies query
- Best practices for complex taxonomies
- wp_get_object_terms – How can I order the resulting array by hierarchy?
- Pros and cons of using [taxonomy name] in place of [category name]?
- How to display and use all existing tags at my write-post-at-frontend-panel?
- How to use create_term, edit_term, delete_term actions?
- Echo taxonomy term meta on author.php
- Hierarchical display of custom taxonomy
- is there any limit of length on creating custom taxonomies?
- custom post type category page
- Advanced custom fields – taxonomy terms images [closed]
- Is It Possible To Have Shared WordPress Custom Post Types?
- WPML Translating a term/taxonomy programmatically
- Display an image instead of tag name?
- Custom fields ‘for’ custom taxonomy?? Can someone explain why?
- Display Custom Post Type Taxonomy Child Categories and their Posts
- Set menu active state for custom posttype and category, given custom taxonomy term
- Register a pre defined tree of taxonomies
- Disabling wp_tag_cloud() outputting inline CSS
- Extend & Search Native WordPress Image Galleries With Tags and Taxonomies?
- A way to query custom taxonomies by name
- How to use taxonomy term as a value of get_template_part?
- Hierarchical Taxonomy Terms Select Menu Output with selected=”selected” Set
- Sorting Custom Posts on Archive page with pagination
- Removing “s” from search with custom parameters
- Pagination on Custom Tax Pages Removes Spaces from Query Vars
- Taxonomy Rewrite Rules Redirecting Instead of Masking
- Does using custom taxonomy is more CPU efficient than using meta_data?
- WP REST API – get custom taxonomies based on terms & filter
- Using WP_Query and Query_post for the loop?
- Multiple Custom Taxonomy Dropdowns Lists
- How to display a custom taxonomy without a link?
- Double slash in the_terms URL
- Using custom taxonomy when registering a new custom post type
- How to call a custom taxonomy term name inside a function?
- Get custom taxonomy name (not the term) in custom post
- How to add custom content to custom taxonomy
- query to use to link to taxonomy single page
- Fix Custom Taxonomy Display two times on each call
- Update Custom Taxonomy Value for a post based on custom date field
- Display Child Categories of Current Post ID
- Taxonomies specific to Page attribute template
- Saving custom taxonomies to post as checkbox on frontend
- How can I show links for custom posts group by taxonomy current term and sub-term?
- Show custom taxaomy as a product meta
- Taxonomy page loading wrong data
- Keeping session instance of random display results over pagination breaks
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- Updating a custom post type’s custom taxonomy in a custom editor block
- Template taxonomy-{taxonomy}.php doesn’t show my posts
- Count tags for current post and save into custom meta field (and update it on post edit)
- Custom taxonomy – no posts found
- How to truncate the description in the admin panel for a custom taxonomy
- Custom button on custom taxonomy listing page
- Custom Taxonomy Archives Page Errors
- customize taxonomy Page
- List all posts from custom post type by taxonomy
- Why is it defaulting to “uncategorized” even after I select a custom taxonomy
- Remove taxonomy menu without removing the metabox?
- Custom taxonomy list in Worpdress
- How can I show custom field according to taxonomy?
- Insert code on specific taxonomy archives
- get_term_children specific no id
- custom texonomy category child category list with parent head
- Taxonomy to display form after creation
- How home my code doesn’t display any feature image? Looping through post from a taxonomy and not getting feature images back
- Add text in custom taxonomy
- How do I check if a post has a term with a particular ancestor/parent?