You can use wp_list_categories()
and pass in your custom taxonomy as an argument like so:
$args = array(
'taxonomy' => 'locations',
'orderby' => 'name',
'hide_empty' => false,
'show_count' => false,
'pad_counts' => false,
'hierarchical' => true,
'title_li' => ''
);
?>
<ul>
<?php wp_list_categories( $args ); ?>
</ul>
https://developer.wordpress.org/reference/functions/wp_list_categories/
Related Posts:
- Display Post co-authored in Author Page
- conditional statement for custom taxonomy
- Rename “Portfolio” slug?
- How to get post’s current parent term ID?
- Copy taxonomy terms from one post to another programmatically
- How to filter custom taxonomy term name, slug, and description?
- Hierarchical taxonomy list with modificated term links
- Show the section only if custom taxonomy was chosen
- Exclude product attributes from taxonomy terms loop
- How to insert wp_users ->user login name to wp_terms when a new user registering?
- Hi need update in my terms for other taxonomy
- How to change the author box selection on a post to a custom taxonomy
- WordPress: Export/Import Yoast meta title & description to custom taxonomy
- Show related products by attribute based and certain conditions
- Display acf taxonomy attachment
- How to hide a child category and show his parent category
- ACF Taxonomy field values not select in backend
- ACF – Can’t get custom post type by taxonomy
- WordPress search query, how to modify the sql
- Custom Taxonomy as Link
- Query specific posts per user selections from dropdown menus
- Three different queries on same page
- Add meta noindex to post if it has a specific taxonomy
- Why my filterable portfolio page work not perfectly between slug button and slug output WORDRPESS?
- Loop through categories and display posts title under each dropdown
- Grab posts by multiple categories
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- How to get original custom taxonomy slug after the slug has been rewritten?
- Displaying custom taxonomy on WooCommerce product page
- Displaying Hierarchical custom taxonomy
- How to split links generated into an xml sitemap to avoid exceeding 30 sec maximum execution time?
- Get term siblings of current child taxonomy
- Adding Taxonomy Image to taxonomy loop [closed]
- multiple taxonomy select display only one in front end
- Display parent and child taxonomies in separate drop down select fields
- How to show only subcategories in parent category not parent category?
- need help with existing code showing subpages
- register_taxonomy() take much queries
- Custom field values to taxonomy terms
- Different Category system needed for the Custom Post Type
- Way to bulk make all my tags lowercase?
- Pull Tags But Not as Links
- Category title output before opening title tag
- List taxonomy term slugs within shortcode (do_shortcode)
- Hide image if taxonomy term is empty
- Isotope Drop Down Categories Filter Function
- working with term_relationships table
- Ajax filter button display all posts
- Add class to website based on post taxonomy
- Use get() method to grab all categories and output inside another method
- Query custom post types & Taxonomies and list them in a table on a page
- Change header on pages displaying taxonomy items
- Listing titles and custom fields of entries within subcategories
- fetch woocommerce product with custom taxonomy
- WordPress site with embedded menu – gives You don’t have permission to access /wp-content/themes/xxx/taxonomy-redirect.php on this server
- Create a a form for custom taxonomy terms
- Storing content into a custom taxonomy
- Creating a Category Taxonomy
- Check in which custom taxonomy belongs and change the style
- Taxonomy term count
- How to get all the items of a taxonomy even if it does not have a custom post type?
- Using page title as a link to term archive
- WordPress custom taxonomy
- Filter unique custom field value based on custom taxonomy category or other custom field
- making php value numeric
- How to break up php code to avoid echo
- Taxonomy term description with style, only if the description exists?
- PHP displaying wrong custom taxonomy images
- Trying to display terms from custom taxonomy within function
- WordPress: Displaying all the post tags from within a specific taxonomy’s term
- how to insert content into my taxonomy
- WordPress Conditional / Multiple Taxonomy Query
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- How to get post count of specific taxonomy that have store name & category
- WP_Query – How to query all of post types categories
- How do I edit the terms output args or array data?
- Filter taxonomy by CPT
- Get taxonomy terms that share a common object property
- update_term_meta() only updating once on certain meta keys
- How to update posts’ custom taxonomy selection?
- How to retrieve taxonomy Metabox fields in frontend
- WP custom posts: filter results to custom taxonomy tag that corresponds to user meta field
- How to add Text before my Custom Term and hide it when empty
- Multiple Tag Filtering
- Categories does not show Block editor WordPress
- custom taxonomies not working
- Filtering custom posts by using checkboxes for taxonomy in an ajax loop always gives server 500 error
- Search for single post by 2 tags
- Taxonomies are not showing in the category dropdown
- How to separate the taxonomies list from the form so that editing taxonmies is the same as pages and posts?
- Permalink like example.com/taxonomy/post_type/postname
- Using Sprit-sheet on WordPress categories
- Custom Taxonomy – fields
- Add Custom Taxonomy into Script
- How to insert text into post based on category – via single.php file
- Displaying child taxonomy before parent
- tax_query not working?
- Get Posts by Custom Taxonomy on Custom Post
- New term taxonomy and description in front page. Input’s
- str_replace not preserving whitespace