As the other’s mentioned, wp_list_categories
will work if you you want to do a list of things (just like wp_list_pages
does for pages).
If you specifically want the link (URL), you can use get_term_link
. If you just have the term ID, it would look something like this.
<?php
$term_id = some_function_that_returns_term_id();
$term_link = get_term_link($term_id, 'your_custom_taxonomy');
if (!is_wp_error($term_link)) {
// do stuff with $term_link
}
If you have the whole term object — for example the object returned by get_term_by
— you can pass the entire object in as the first argument of get_term_link
and you’re done.
<?php
$term = get_term_by('id', $some_term_id, 'your_custom_taxonomy');
$term_link = false;
if ($term) {
$term_link = get_term_link($term);
}
if (!is_wp_error($term_link)) {
// do stuff with $term_link
}
Related Posts:
- How to remove the tag cloud from custom taxonomy admin page?
- Custom columns on edit-tags.php main page
- custom post type taxonomy “tag” archive : no post found
- Exclude Specific Term from Search
- Can I turn off write-in tags/taxonomies?
- Is it possible to use one slug for Multiple Taxonomies?
- Widget to display custom taxonomy tag cloud
- Post tags saving as both tag name & tag ID on post update when tags are displayed as checkboxes
- Non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue
- How to display and use all existing tags at my write-post-at-frontend-panel?
- how to get title to custom tags page
- How do I display a tag cloud with both post tags AND a custom taxonomy?
- Can I turn off write-in tags/taxonomies?
- WordPress renames slug of tags used in multiple taxonomies?
- Allow only 1 instance of each term in each custom taxonomy
- How do I make a custom taxomony appear like tags?
- Make tag cloud links consistent
- Hook to change Custom Tag Taxonomy Links?
- How to adjust code to refresh a dropdown box with tags that are active on filtered category listing
- Metabox to list/store a certain type of post tag
- Sorting Tags by Slug Value
- Extend & Search Native WordPress Image Galleries With Tags and Taxonomies?
- How to filter a post in the Tag Cloud widget, using tags of a media library image attached to the post?
- Replace taxonomy permalinks
- Front-End Custom Taxonomy Tag Select
- Create custom taxonomy and Display in metabox dropdown
- Problem with removing post tags programmatically
- saving meta/custom field to tag
- Changing input type from text to multi select dropdown – skill taxonomy
- Displaying user selected custom tags/taxonomies on the front-end
- Featured Images for Tags?
- Displaying the post count of all custom taxonomy terms in a list format
- Automatically tag posts based on user-defined words [closed]
- making an index from custom taxonomies and tags of posts (not hierarchical taxonomy)
- Set two terms for a post when they differ only by an accent
- Get tags name under custom taxonomy in wordpress
- Filter Tags for current users
- Limit Tag Links in Post Content
- Change the Page Title of the Archive Page for Portfolio Tags
- Using wp_tag_cloud with only current post tag with special class
- Get Posts by tag from a custom taxonomy
- Display the first tag assigned to a post
- Display custom post taxonomies
- How to randomise a custom taxonomy tag cloud
- How do i change the tags and taxonomies
- Any way to make custom taxonomy field searchable?
- How to get tags with custom taxonomy field?
- Primary Taxonomy for Post
- Group custom taxonomies based on tags contained in their posts
- Contact Form 7 – Populate Select List With Taxonomy [closed]
- How To Change Custom Taxonomy To Radio Buttons
- Page queried instead of a custom taxonomy
- Pros and cons of using [taxonomy name] in place of [category name]?
- Custom Taxonomy terms with latest post ordered by date pagination issue
- drop-down list another query
- custom taxonomy archive permalink shows 404 error
- is there any limit of length on creating custom taxonomies?
- How to get a list of taxonomy terms which are being used only within certain post types?
- Taxonomies: display hierarchical parent list
- List Custom Taxonomy Based on Post Count & Category
- Custom taxonomies as product variations
- Query post from all category with same tag on 1 pages
- Print terms with taxonomy and metabox value
- List taxonomies according to whether this post is in another taxonomy in taxonomy archive
- Create and set templates for custom taxonomies
- Taxonomy template shows only 10 posts
- Pagination on custom taxonomy
- How to show all possible parents and children of a hierarchical taxonomy term?
- Creating terms vs custom post meta to save data?
- Sticky posts or Featured posts only on Homepage
- Custom Taxonomy
- querying posts by custom taxonomy terms right from a querystring based URL
- How to set custom capabilities for custom taxonomies?
- Display posts with tag for custom post type only
- Why doesnt this query work? (Custom Taxonomy)
- How to show post list based on taxonomy term?
- WordPress autocomplete search with taxonomies
- Display empty custom taxonomies differently than with one with posts
- remove term from custom taxonomy list
- Display taxonomy with a maximum number of letters
- Dropdown list of taxonomies won’t display selected
- Display Child Categories of Current Post ID
- Taxonomies specific to Page attribute template
- Custom taxonomies registered via plugin stop existing after function finishes running
- Echo ACF taxonomy field within a foreach for another taxonomy
- How can I rewrite the URL of my custom taxonomy to include the year?
- Infinite Scroll appending Next Product Category Term pages
- Listing Cities A custom taxonmy by selection order
- Count tags for current post and save into custom meta field (and update it on post edit)
- Problem registering custom taxonomy
- Passing taxonomy id of taxonomy clicked on one page to another page
- Custom Taxonomy Not Being Recognized by is_tax()
- Permalinks incorrectly inserting multiple categories
- Loop multiple taxonomy in custom post
- Why is it defaulting to “uncategorized” even after I select a custom taxonomy
- Get one custom taxonomy category
- Creating a page for custom taxonomy archive
- WordPress Taxonomy Menu
- Returning info from MYSQL table via custom taxonomy
- Hide empty categories on widget