I’ve managed to figure this out myself, so if anyone out there needs some help please try the following…
Using the get_terms rather than trying to query it directly.
<?php
$terms = get_terms('custom-tax-name', array('hierarchical' => false));
foreach ($terms as $term) {
$term_link = get_term_link( $term );
if ( have_posts() ) :
?>
<a href="https://wordpress.stackexchange.com/questions/199223/<?php echo $term_link; ?>">
<?php echo '<h3>'.$term->name.'</h3>'; ?>
</a>
<?php endif; wp_reset_query(); } ?>
Related Posts:
- Change order of Custom Taxonomy List
- Get term name from term ID?
- Contact Form 7 – Populate Select List With Taxonomy [closed]
- Can custom taxonomies be displayed inside of a custom meta box?
- How To Change Custom Taxonomy To Radio Buttons
- Front End Post Save Child terms
- Display child taxonomy until the last child
- URL rewrite rules for multiple taxonomies query
- Page queried instead of a custom taxonomy
- 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?
- Custom Taxonomy terms with latest post ordered by date pagination issue
- drop-down list another query
- Echo taxonomy term meta on author.php
- Hierarchical display of custom taxonomy
- custom taxonomy archive permalink shows 404 error
- is there any limit of length on creating custom taxonomies?
- WordPress renames slug of tags used in multiple taxonomies?
- How to get a list of taxonomy terms which are being used only within certain post types?
- Taxonomies: display hierarchical parent list
- WPML Translating a term/taxonomy programmatically
- how to search in custom fields & custom taxonomy for custom search
- List Custom Taxonomy Based on Post Count & Category
- Custom taxonomies as product variations
- Display an image instead of tag name?
- Echo specific term in an array
- Custom fields ‘for’ custom taxonomy?? Can someone explain why?
- Display Custom Post Type Taxonomy Child Categories and their Posts
- 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
- Register a pre defined tree of taxonomies
- Disabling wp_tag_cloud() outputting inline CSS
- 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
- How to use taxonomy term as a value of get_template_part?
- querying posts by custom taxonomy terms right from a querystring based URL
- How to change url for taxonomy pages?
- How Parent Taxonomy automatically added to the post when using `wp_set_object_terms()`?
- How to set custom capabilities for custom taxonomies?
- How to Modify Default Text in a Custom Taxonomy Admin Panel?
- Take a custom taxonomy value and save as a standard Product Tag
- Check If Taxonomy A and Taxonomy B has same Slug, 301 Auto Redirect Tax A to Tax B if True in WordPress
- Why isn’t the ‘no results’ being shown when a query returns no results?
- wp_dropdown_categories – how to save in widget?
- Loop to display ONLY custom taxonomy parent information [closed]
- echo a specific custom taxonomy term on a different custom taxonomy archive
- Loop through custom taxanomy in post and display custom fields from posts
- WordPress sub taxonomy template
- SEO Title Tag and Meta Description for custom taxonomy
- query_posts that have custom taxonomy and limiting what shows based on the taxonomy
- list custom taxonomy with count
- Comma separator problem of custom taxonomy
- How can i fix a 404 error when targeting custom taxonomy slug ?
- Custom Taxonomy List with Children
- Dynamically generate category id and store in variable
- saving custom taxonomy as post title
- Taxonomy list links to first post in that term
- Page for custom taxonomy
- Extra Meta Data for WordPress Multisite Taxonomy
- Problem with sorting in custom child taxonomy archive page
- Connect ACF field + custom taxonomy [closed]
- Check if any available product has specific attribute
- Tax-query on taxonomy doesn´t work
- How to Create taxonomy using ‘null’ for $object_type?
- how can i add more than one custom taxonomy?
- get parent and childs from hierarchcial taxonomy
- Query Multiple Taxonomies and Multiple Terms with Different Operators
- Custom rewrite url structure for several custom taxonomy (NOT pos_type)
- Custom taxonomies template
- Pre_get_post custom taxonomy combined with custom fields?
- Adding a checkbox field to a (custom) taxonomy
- Country-specific content
- Custom taxonomy archive template not recognised
- Ignore punctuation marks in taxonomy order by name
- Echo custom taxonomy values
- Get the terms of a post
- Resize $term attachment using url
- Product dimensions filter by taxonomy
- How can I pull the slug of a custom taxonomy and output it in a class?
- customize taxonomy Page
- 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
- Get one custom taxonomy category
- How can I show custom field according to taxonomy?
- Creating a page for custom taxonomy archive
- WordPress Taxonomy Menu
- Insert code on specific taxonomy archives
- Returning info from MYSQL table via custom taxonomy
- get_term_children specific no id
- custom texonomy category child category list with parent head
- Add Gutenberg editor to edit taxonomy (category) page
- post_type_link not working for posts without terms
- Why my archive title isn’t showing?