The functions such as get_categories
are unique to the post category taxonomy. “Category” is a taxonomy term. If you register your own taxonomies, you need to use get_terms which has similar parameters to your get_categories function.
$terms = get_terms(array(
'hide_empty' => false,
'orderby' => 'name',
'order' => 'ASC',
'taxonomy' => 'your-taxonomy'
));
Related Posts:
- Get all sub-categories of a parent category
- Show Available Taxonomy List with Current Category
- list taxonomy based on taxonomy
- Check if a post is in any child category of a parent category
- How to export and import taxonomies (category, tag and/or custom taxonomy) and their terms
- How to display non-hierarchical taxonomy as terms with checkboxes?
- Control term order on a per-post basis
- How can I add the featured image functionality to a custom taxonomy?
- Share one taxonomy across multiple blogs in 3.0 [duplicate]
- Can a Child Category Have More than One Parent?
- Combine two taxonomies in a hierarchical tree
- Admin Panel – Disable Moving Selected Terms To Top of Metabox
- How to make custom taxonomy check boxes like ‘Categories’
- Create terms when registering taxonomy?
- Display list of Sub-Categories and the posts they contain, within one main Category
- How to create non-unique sub-category slugs?
- How to add HTML5 ‘required’ attribute to wp_dropdown_categories() without JavaScripts?
- How to Override default update_count_callback for category
- Does WordPress Offer a Way to Find All of the Categories that Don’t Have Children?
- Add custom taxonomy terms to WordPress menu dynamically & append #slug to url
- wp_list_categories, Add class to all list items with children
- Getting WordPress custom taxonomy/category?
- Display only one result from “get_the_category_list”
- Display empty taxonomy terms with get_terms()
- Return category slug / title from category ID
- Connecting WordPress gallery to custom categories (taxonomy)
- How to get the number of child categories a specific parent category has?
- Get term by slug in Gutenberg
- How to get the depth of a category’s subcategories
- New categories are now going to 404s
- Best way to programmatically link to multiple categories (union/intersection) [closed]
- “Reversable” and “Re-useable” Subcategories (or other taxonomic structure)
- Get multidimensional array that reflects category hierarchy
- How to find the number of Tags a post has?
- Want to hide some categories from the categories meta box in the post editor for the two specific user roles
- wordpress wp_list_categories
- Taxonomy filter all children
- Force a user’s posts category
- Search Posts / Pages with multiple options?
- ACF: Display category name using taxonomy field
- How to get the id from the custom category?
- How to filter out Categories for specific post types on WordPress Admin?
- How can i insert term in a specific language of Polylang?
- Taxonomy name repeating when showing 2 posts from each category
- New Categories Not Shown In the Post Edit Page
- Shortcodes not working in category or tag description
- Display the last post by each category?
- Display Posts Loop for each parent and for each Child
- How can I edit the ‘Most Used’ tab in the categories meta-box to show another custom taxonomy?
- Custom taxonomy/category order
- Why don’t posts show up in my categories on the frontend?
- Flat category URLs but retaining hierarchy?
- limit a list of tags to one category [closed]
- How many categories can WordPress handle before performance suffers?
- Targeting Parent Category Pages
- Wacky taxonomy in wordpress
- get_terms function not returning anything
- how to wordpress When I click on the category link, subcategories appear
- Include WooCommerce product to all child categories
- Question on using custom structures for categories
- Notice: Trying to get property of non-object in : custom fields category
- new WP_Query all post in a category inside the loop
- get listed category’s id?
- List Child Categorie and hide the parent
- WP REST API not retrieving all categories
- Hide specific category from wp_list_categories
- Some categories missing on wp-admin/edit-tags.php?taxonomy=category
- List just subcategory and products of active category page in Woocommerce
- How do I add a separator to my list of terms with get_category
- Eliminate word from $term->name
- Style a category from category list
- How to schedule categories?
- Copy post taxonomy?
- How to get posts using category slug in ClassiPress?
- Combining these queries? (Same taxonomy term + same category as post)
- Getting the posts list visualised in categories tree
- Disable Category Taxonomy
- How to set acf color field as background color to product category
- How to target all woocommerce categories that don’t have any subcategories in them?
- Filtering posts in category by tag URL
- Number of categories slowing down the site
- Image Upload Custom Form Field for Category and Custom Taxonomy
- Create duplicate category page with content variations
- How to echo Tags and Categories as plain text
- How can I add HTML classes for current taxonomy/term hierarchy into my pages to simplify styles?
- How Can Hide Define Category in Post Contents?
- Display List of Categories Within a Custom Taxonomy
- get_adjacent_post_link excluded_terms ignored
- Taxonomy for custom post type not found
- Category base 404 – fix
- Why is my post categories not displaying?
- Search tag within category
- Problem importing categories and sub-categories
- Listing category
- List products from current category
- Assign a category by user and customize the edit-tags.php?taxonomy=category page
- Show parent-child relationship for categories in the wordpress admin
- Woocommerce custom taxonomy order
- Hook action when create new category [duplicate]
- Order Categories by Character Count