You have error in your PHP. This array('parent', $id_parent)
will produce numeric array with two values – string parent
and value of $id_parent
.
What you actually need is array( 'parent' => $id_parent )
which will produce correct associative array with one entry of key parent
and value $id_parent
.
Related Posts:
- Is There a Difference Between Taxonomies and Categories?
- 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
- Control term order on a per-post basis
- How can I select a primary 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
- Display empty taxonomy terms with get_terms()
- List Terms in Category
- How can i insert term in a specific language of Polylang?
- Why does the argument list_only do on Walker_Category_Checklist::start_el?
- Display Posts Loop for each parent and for each Child
- Is There a Difference Between Taxonomies and Categories?
- Get posts under a category with SQL
- get_terms function not returning anything
- Display custom taxonomy attached to the post on post single page
- Display sibling categories on category page
- Combining these queries? (Same taxonomy term + same category as post)
- Get WooCommerce product category list in functions.php
- outputting taxonomy hierarchy
- Display List of Categories Within a Custom Taxonomy
- get_adjacent_post_link excluded_terms ignored
- Why is my post categories not displaying?
- Taxonomy term RestApi data 10 rows limitions
- hide_empty property not working when using get_terms
- get_terms vs. get_categories: does it matter?
- Woocommerce get category image full size
- Fixing category count
- Can a Child Category Have More than One Parent?
- Combine two taxonomies in a hierarchical tree
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- Elegant way to add parent categories?
- Create terms when registering taxonomy?
- Send an email when custom post type category is changed
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Update term count using a callback function
- Removed slug from CPT, now How/where do I hook the filter to the taxonomy term archive pages link?
- Action hooks returning old category instead of new category
- wp_list_categories, Add class to all list items with children
- Getting WordPress custom taxonomy/category?
- 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
- Want to hide some categories from the categories meta box in the post editor for the two specific user roles
- display taxonomy slug from term ID
- Taxonomy filter all children
- Force a user’s posts category
- Search Posts / Pages with multiple options?
- How to get the id from the custom category?
- How to filter out Categories for specific post types on WordPress Admin?
- 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?
- Get posts from specific taxonomy term
- How many categories can WordPress handle before performance suffers?
- Getting category URL with hyphens, not spaces
- Targeting Parent Category Pages
- Include WooCommerce product to all child categories
- Notice: Trying to get property of non-object in : custom fields category
- How to Link to Most Recent Custom Post of Same Term
- WP REST API not retrieving all categories
- Some categories missing on wp-admin/edit-tags.php?taxonomy=category
- Eliminate word from $term->name
- Style a category from category list
- How to schedule categories?
- Showing HTML if Post is In Certain Taxonomy Term
- Copy post taxonomy?
- How to get posts using category slug in ClassiPress?
- Add properties to term object
- get_object_term_cache duplicate terms after update to wordpress 6
- Disable Category Taxonomy
- Sort categories by custom field in WordPress admin
- How to get immediate children of a ‘term’ parent id through ‘get_terms’?
- 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?
- Replace deprecated get_category_children code with get_terms
- Filtering posts in category by tag URL
- get taxonomy list in a page in the wordpress
- Number of categories slowing down the site
- Image Upload Custom Form Field for Category and Custom Taxonomy
- Add subcategories posts to the counts column at the admin’s categories list
- How to echo Tags and Categories as plain text
- Get category of a taxonomy for a queries object in a loop
- List Terms by category
- How to add a new child category via an SQL statement?
- Taxonomy for custom post type not found
- Category base 404 – fix
- exclude parents from the_terms
- Use get variable when rewritten url in wordpress
- Assign a category by user and customize the edit-tags.php?taxonomy=category page
- Issue on Listing Sub Product Categories In Woocommerce
- Order Categories by Character Count
- Images as Categories
- Quick Edit on taxonomy names results in error