Assuming the taxonomy name is “animals”
<?php
//This will show all the terms in taxonomy whether they have posts or not thus the "hide_empty"
$terms = get_terms( array ( 'taxonomy' => 'animals', 'hide_empty' => false, 'parent' => 0, 'orderby' => 'description', 'order' => 'ASC' ));
foreach ($terms as $term) {
// The $term is an object, so we can get the names.
//use var_dump($term) to see other options available
echo $name = $term->name;
}
?>
Related Posts:
- Custom Post Type – Taxonomy Dropdown Menu?
- Custom Taxonomy Template Post List with Sort Order
- Custom Post Type with Custom Title
- Add Taxonomy Values Within a Custom Post Type RSS Feed
- Assign Taxonomy Based on Custom Field Value
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Targeting categories in custom fields
- Get post-meta value of all custom-posts – lowest to highest year-count?
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Query Distinct Taxonomies of Custom Post Type
- Category display using conditions
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- Show child custom post types list inside single parent custom post type
- limit value taxonomy based on previous taxonomy value wordpress
- Dynamic dropdown select values depending on other custom field value
- How to render a custom post type template with custom fields using shortcode
- Disable saving posts as draft (make all posts mandatory regardless of the post status)
- Grouping metadatas into one
- Tracking changes in admin-page so user gets warning when leaving the page
- filter custom post in rest api with custom function
- Get Posts by multiple custom fields is not working
- Several post types on WP Query by tag and taxonomy
- Woocommerce custom field search in custom post type [closed]
- Using meta_query and tax_query at the same time
- Add custom field in comments form
- How do I display the taxonomy for a custom post type in an array
- Set a CPT slug as a base name for all the taxonomies
- Custom Fields for Custom Post [closed]
- Order Custom Post Type by Custom Field Value
- How to conditionally redirect to the post from a taxonomy page?
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- How do I display the grand child items of a taxonomy term?
- Taxonomies relations
- Filter custom post types by a field value
- Displaying All Posts of a Custom Post Type in WordPress Multisite Backend
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Full Custom Post Type List Organised by two Taxonomies
- Repeatable Fields Metabox with Textarea (or wp_editor)
- How to use TinyMCE Editor for one of my custom post meta field?
- WordPress Doesn’t Generate Taxonomy Archive
- Custom REST endpoints for a custom post type with custom fields
- Suggested Post and Taxonomy structure
- How to Create a WordPress Plugin With Custom Post Type/Custom Field Features?
- Hierarchy and access control for Custom Post Types (CPT)
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- How to integrate a form (Ninja Form or Contact Form 7) with Custom Post Types?
- First custom field value (out of several) displayed twice after query
- Custom post with more than one custom taxonomy
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Meta Query posts not showing on ending date of custom field
- Get the taxonomy of a post hierarchically
- Cannot save CPT meta box
- Cross reference custom post types
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- Multiple pages for posts?
- Adding Page Templates to post but it ignored it
- Display latest x posts from all categories in Custom Post Type/Taxonomy
- Include related custom fields from one post type in another post type’s JSON feed
- How to get list of taxonomy slugs ordered parents>childs?
- Admin Custom Meta Box – Pull Last 5 Posts from Custom Post Type
- frontend image post uploader
- Is there any way to add a “custom field” to the CPT archive page?
- How to Output which matched meta_keys were found from custom_type_posts?
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- How do I share categories across multiple post types?
- Multiple Frontend Filters Using Advanced Custom Fields
- How to organize hierarchical structure in custom post type with taxonomy (like with categories)
- Custom Post Fields at the beginning of a Custom Permalink
- Multiple tag cloud filtering
- Integrate Custom Post Type Events into Calendar
- Possible to filter custom post type with multiple meta data?
- Get url.com/post_type/taxonomy/term work!
- Hierarchical custom fields
- How to get a custom field value of a custom post?
- Fields for different parts of a page
- Is it possible to activate customfield ‘text description’ upon activating the customfield ‘checkbox’?
- Facebook social publisher and custom post type fields [closed]
- Displaying custom field according to date
- Displaying and searching Custom Posts
- Importing Data from a Non-WordPress database, into WP
- Taxonomy in URL
- custom comments form for custom post type
- Searching Custom Fields
- How to organise this data within WordPress
- Show fields based on taxonomy selection in editor
- filter search custom field query
- Permalinks: custom structure for taxonomy – tags?
- Organize WordPress site, so it can maintain with huge database
- How to let users choose where to search for posts?
- Review site custom post type structure
- don’t publish custom post type post if a meta data field isn’t valid
- Filter get_cat_id for Custom Post Type
- WebP Fallback for Inline Background Image in Style Attribute
- Query based on custom fields start and end date
- How to add multiple markers on the google map, at a certain meta_key and meta_value
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link