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
- How to change permalink structure for custom post type and it’s taxonomies?
- Do_Shortcode not working for Embed
- How do I list custom taxonomy terms without the links?
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Order Posts by Taxonomy and Meta Value
- It is possible to get a list of post types asociated to a taxonomy?
- display multiple term post from taxonomy in a single page
- How to get the parent’s taxonomy?
- Group Custom post type in a page by its taxomony tag
- Same base slug for CPT post and CPT taxonomy terms
- wp_insert_post custom taxonomy
- add_meta_box: Datepicker like the one for postdate?
- Post Link Filter Help [closed]
- Custom field losing p tags on display
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Getting a “Changes you made will be lost” dialog prompt on a custom post type page
- Search Custom Post Type Custom Fields
- Saving repeated option values in a custom query
- How to remove slug metabox from custom post type’s page?
- Custom fields in Permalinks?
- query posts and custom post type with meta key
- get_terms showing all categories instead of the ones assigned to a specific post
- Why does querying on post_tags (which has been applied to custom post types) only return posts?
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- Adding Show Less/More link to Custom Post Meta
- Is using taxonomies the way to go here or would custom post types be better?
- Categories of custom taxonomy don’t show any posts
- WordPress Custom Fields Won’t Save
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Is it possible to have dedicated page for parent/child taxonomy?
- Meta Query Not Returning Output Despite Having Matching Values
- Display a grid of taxonomy terms at root taxonomy page
- limit value taxonomy based on previous taxonomy value wordpress
- Repeatable Fields Metabox with Textarea (or wp_editor)
- How to use TinyMCE Editor for one of my custom post meta field?
- Displaying custom field according to date
- Taxonomy in URL
- How to organise this data within WordPress
- filter search custom field query
- Warning: Invalid argument supplied for foreach() [closed]
- Add additional field to custom post_type
- create custom meta box with default value
- Add custom attributes to a post
- Custom Taxonomy Search result page
- Custom taxonomy template list not working (404)
- Use the custom post type archive for taxonomies?
- Taxonomy template page not working
- Increasing the default number of posts in custom post types
- Ideas to connect external database table to wordpress posts as custom field source
- Running a custom query inside another cpt single and trying to grab a variable
- Get posts by category name
- Query all posts under one taxonomy? Why is my code not working?
- Create list from custom field comma separated values
- add_filter get array data before display in custom post_type
- Get previous and next custom post by custom field
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- Order posts by taxonomy terms
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- WP_Query get always custom post_type for first
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Define multiple prefixes for custom post type
- Query custom post type and custom field by URL parameters
- Taxonomies are not showing in the category dropdown
- meta query multiple values for the same key
- Change custom post taxonomy values from front-end
- Show Post columns to specific users on condition
- Custom post types – meta_query: search lesson which starts sooner
- Taxonomy to Post Type. Every Taxonomy Item can be Producer or Developer
- Custom Taxonomy – fields
- Pages of my taxonomy terms are showing all posts
- Populate custom post type/custom fields from an external database
- Custom Field to post_title
- Automatically convert standard posts with custom fields to custom post types
- Get month and day from a Date Picker custom field
- custom fields not showing before get_header
- Create an additional template page for every term taxonomy
- Display Custom Post if custom field is marked
- predefined custom field on registration page
- Displaying taxonomy icon outside archive page
- Show taxonomies from specific CPT
- List a custom post type’s posts ordered by nested custom taxonomy
- Select Menu for Custom post Type does not save
- loop through custom post-type with two meta_keys
- Allow authors to create article image
- How to add to taxonomies to a post type
- Filtering custom post types using category taxonomy
- Update Custom Field daily within 7days
- custom taxonomy not return in the code