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
- Show all terms of a custom taxonomy?
- How to Add Custom Fields to Custom Taxonomies in WordPress CLEANLY
- Creating custom Woocommerce attribute taxonomies from a plugin
- How to paginate a list of custom taxonomy terms?
- WordPress custom taxonomy description for each post?
- How to find objects by terms
- Display certain amount of posts on taxonomy archive page
- Get used terms by an author as array of strings
- Get all taxonomies for all post types
- PHP Customization: Taxonomies and Queries, why? [closed]
- Include a specific post to the query_posts and remove it if it is already in the returned list
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- How to add custom taxonomy slug in CPT permalink?
- Make first letter of my taxonomy uppercase
- Get taxonomy terms only of the WP_Query current posts
- get_terms orderby numeric
- Sum custom field values of particular taxonomy
- Query all posts of a custom taxonomy term
- Taxonomy linked to pages
- Randomly Assign an Image’s Alt Text Based on Data From Post
- Loop through categories and display posts title under each dropdown
- 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
- Get term siblings of current child taxonomy
- Adding Taxonomy Image to taxonomy loop [closed]
- multiple taxonomy select display only one in front end
- 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
- Way to bulk make all my tags lowercase?
- List taxonomy term slugs within shortcode (do_shortcode)
- Isotope Drop Down Categories Filter Function
- working with term_relationships table
- Use get() method to grab all categories and output inside another method
- fetch woocommerce product with custom taxonomy
- Creating a Category Taxonomy
- How to get all the items of a taxonomy even if it does not have a custom post type?
- WordPress custom taxonomy
- Filter unique custom field value based on custom taxonomy category or other custom field
- making php value numeric
- 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
- 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
- How to add Text before my Custom Term and hide it when empty
- Taxonomies are not showing in the category dropdown
- Permalink like example.com/taxonomy/post_type/postname
- Using Sprit-sheet on WordPress categories
- Custom Taxonomy – fields
- How to insert text into post based on category – via single.php file
- Displaying child taxonomy before parent
- Get Posts by Custom Taxonomy on Custom Post
- New term taxonomy and description in front page. Input’s
- str_replace not preserving whitespace
- How to associate dynamic PHP page for chosen WordPress tag?
- How to replace hard-coded list of custom taxonomy terms based on custom field query [closed]
- How to hide the Duplicate taxonomy values in WordPress?
- Custom Taxonomy Link Text Echo Name Not Slug
- WordPress Rewrite Issue
- Limit Taxonomy Parents
- Get category id for a custom category and display it in a class
- Saving category as insert post
- Get all the contents of taxonomy and sort by term
- wordpress taxonomy in regular posts
- Display terms on product page with shotrcode
- Custom taxonomy with page post type – WordPress
- Query posts by custom taxonomy slug in WP REST API?
- WordPress different custom tag being displayed in on tag list
- Get category name of current post (CPT UI)
- Remove colon from CTP UI “Singular Label”
- I want to show image from custom field image on my custom page template
- How to make multiple custom taxonomies sit under custom post type slug?