Are there actually any terms in your dahn_muc
custom taxonomy? get_terms
won’t return anything if no terms have been created.
Also, how did you create your custom taxonomy? I usually rely on GenerateWP.com’s taxonomy generator to make sure everything’s done properly.
Lastly, it might be better to reverse how you populate your $inra
array. Use the term IDs as the keys, instead of the values:
foreach ( $danhmucs as $danhmuc ) {
...
$inra[$iddm] = $tendm;
...
}
Related Posts:
- How to call custom taxonomy categories with shortcodes
- how to create a proper query for getting a list of users with taxonomy related meta key
- How to check if do_shortcode will be execute directly in a template php file
- Google Map Shortcode for Custom Taxonomy/Post Types
- Taxonomy Order by Name
- How to create a custom taxonomy using a shortcode?
- Shortcode to show the terms from the current post (custom post type & custom taxonomy)
- How to add a shortcode function that returns the taxonomy slug of the actual post within the loop
- WordPress shortcode Issue!
- Custom taxonomy in short code
- Get taxonomy image for Toolset custom taxonomy through Toolset Views Shortcode
- How to only list the child terms of a taxonomy and not their parents?
- How to use taxonomies on attachments with the new Media Library?
- Hierarchical taxonomy UI
- Create a shortcode to display custom post types with a specific taxonomy
- How to display custom taxonomies in posts?
- Filtering custom taxonomies
- Allowing specific users to only add posts using certain custom taxomy terms
- Edit tags page for hierarchical taxonomy doesn’t show taxonomies at all depths
- I want to load post content by categories using Ajax
- Hook to process a new taxonomy tag before it is created?
- Removing taxonomy base using WP rewrite
- get_terms() returns an empty array
- Scheduling posts to update once per day with wp_cron
- How to find taxonomy name using only taxonomy TERM ID (or taxonomy term name)
- Multiple users – only allow them to manage their own terms for custom taxonomy when logged in
- WP_insert_term how to insert multiple values as taxonomny term?
- How to include parent terms in hierarchical taxonomy URLs?
- How do I display a tag cloud with both post tags AND a custom taxonomy?
- Custom taxonomy term as class?
- How to edit/remove a term that’s in multiple taxonomies?
- Using a loop to display terms associated with a post
- Custom Taxonomy: Parent still counting deleted Child
- Improving WP_Query performance for multiple taxonomies
- Create Child Taxonomies
- Taxonomy page template changing when using query variables
- Get direct children of custom taxonomy
- How to add autocomplete to custom taxonomy for CPT
- List subcategory on taxonomy term page
- Operations with custom fields values in a loop
- How to get custom post type taxonomy
- Using wp_list_categories to show more than one custom taxonomy
- Show all posts without a custom taxonomy
- remove sanitize_title() for register_taxonomy()
- How do I taxonomy terms based on terms they are used alongside?
- Can I use a Custom Meta Value inside of ‘get_the_terms’?
- How do I list the pages of a custom taxonomy?
- has_term if/echo else/echo function
- Why does a new taxonomy term get created when I assign an existing term to a post?
- Category list with indent children list below current category
- Some of my custom taxonomies are not showing but still counted in a WPMU set up
- Remove categories from post edit page, but keep in sidebar?
- How to set taxonomy hierarchical level to 2?
- Custom Taxonomy Not Working When added to WordPress Search
- Custom taxonomy terms in the admin site is not saving for widget
- Widget dropdown always displays first option
- Display all taxonomy, children and grandchildren with links
- Using custom taxonomies to display hierarchical URLs?
- Passing form inputs into multi-taxonomy query
- Custom Taxonomy Tag Cloud?
- Taxonomy Parent Name
- Make child taxonomy categories use a set template
- Copy/clone/associate Custom field to Custom Taxonomy
- Query posts using custom taxonomy and selected terms
- Load a certain functions file for a certain taxonomy
- one post per term taxonomy
- How do I get the labels from a post
- Hide custom taxonomy from easy admin
- Add file attachments/meta to a custom Taxonomy
- Displaying user selected custom tags/taxonomies on the front-end
- Why can’t I access Custom Taxonomy metadata?
- Permalinks with custom taxonomies and regular categories
- WP_Query tax_query – Show results if child has parent X
- Running a function only once when a taxonomy term is changed
- Taxonomy or Custom Field
- Trash Bin for Categories?
- Custom taxonomy – checking if name includes a declared value
- Wp_insert_term doesn’t work from separate file with custom taxonomy
- Random order not working correctly when using default loop + $query->set
- Convert post meta to custom taxonomy?
- How to create filter’s for custom taxonomy page
- Query by multiple custom taxonomies
- get the custom taxonomy name?
- How to add all existing Custom Taxonomy to Admin Menu Creations Interface?
- Modify title of custom taxonomy archive page
- Catchable fatal error: Object of class WP_Error
- WordPress custom taxonomies new/edit post autocomplete
- Templates files for custom post type with custom tags
- taxonomy query on front page
- Pagination with custom query (not using posts)
- What’s the proper WordPress URL for the template of my custom taxonomy?
- WordPress show posts from children terms of a taxonomy term
- Get Posts with matching lowest taxonomies
- How to randomise a custom taxonomy tag cloud
- query posts returns 10 records
- Select Custom Taxonomy from Theme Options
- Remove Tag Cloud Words from Custom Taxonomy
- How to add/enqueue Custom CSS for a custom taxonomy page?
- add_rewrite_rule pagination 404 error on page 4 and above
- Taxonomies starting with a hyphen (minus) to assign B.C. dates to a post