I solved by force refreshing the cache (by @passatgt).
i.e., place this line after the insertion:
delete_option("{$taxonomy}_children");
Thanks!
Related Posts:
- Check is category parent with ids from the childs – get_term_children
- Get the children of the parent category
- Check if a post is in any child category of a parent category
- How to display non-hierarchical taxonomy as terms with checkboxes?
- How to make child categories recognize parent’s template displays
- Different template for subcategories
- Categories’ hierarchy in URL
- How to only show posts on last child category
- Show children of top level category only
- How can I make wp_list_categories output li with category-slug as class, for its children?
- Categories lose hierarchy order once assigned to post
- Add Product categories to WordPress menu without losing hierarchy
- How can I get an tag to wrap each ancestor that gets outputted in this condition?
- how to get the categories for a single post in a hierarchical way
- Category tree is flattened inside admin upon saving
- Show only first children level of current category?
- Categories vs. Page Site Organization
- How to enable category hierarchy for links?
- Query Posts Exclude Entire Category
- Combining post categories and link categories?
- How to categorize posts under Category 1 and Category 2 which are separate lists of categories, and display them as separate lists in widgets
- Category shows only top level child categories
- Give a page priority over a category that has the same name?
- Add child category to parent on post creation and save
- How do I make the category sidebar widget (stock) display the total # of posts including those in subcategories?
- How to get Next/previous_post_link to go through articles in top parent category
- Hierarchical permalink structure for posts showing categories and sub-categories
- Give Children Unique ID’s
- WordPress list categories dropdown with parent-child relation and child under it’s parent
- Display only subcategories of a category and not sub-subcategories
- List child categories from parent category on custom taxonomy page
- How to load several hierarchical categories from functions.php
- Posts not listing out sub category in hierarchy
- list all child categories that apply to current post even if those cats are empty?
- Check for parent category
- Show subChild categories
- Parent Category and Subcategory default text generated with category
- outputting taxonomy hierarchy
- How to create template for children category?
- Different template for subcategories
- Need list of child category post titles sorted by child category
- Most efficient use of custom taxonomies, categories, and pages
- list first post of Child Category on Category page
- Display categories and their IDs
- how to display page title only for child category pages
- How to retrieve posts from parent category, splitting them per children when displayed?
- List the category tree of all the product_cat categories
- Display all posts from all categories with pagination
- is_category() function
- Remove “Category Archives: title” at the top of a category page [duplicate]
- WooCommerce – Display product child categories from specific parent
- Display empty taxonomy terms with get_terms()
- Show list of categories even if they have no posts
- How can I show the subcategories content on the parent category page?
- Format Brand value in Category view [closed]
- Get multidimensional array that reflects category hierarchy
- Possible to make a subdirectory that loops through a single category?
- Archives for each category on WP Multisite
- Update post title with category name after editing a category
- Automatically set default password to all posts in a specific category
- Warn me about ‘uncategorized’ posts
- Categories showing page not found
- Why category.php throw 404 in wordpress while calling paginate_links()?
- How to get related tags based on a category?
- How to show a list of only categories (exclude subcategories)
- How to list categories in reverse alphabetical order?
- I want to show category name when using [category] shortcode
- Category list with postcount
- How to hide some categories in dashboard
- How to choose the content from a post which is in the right category?
- How to display product with two condition, category and brand taxonomy
- How to get category id’s which are added in main menu?
- Category List and Automatic jQuery classes
- get all categories’ latest post in one query
- Categories show 404 error on multisite installation
- Show posts from category specified using a custom field
- excude a specidic category from showing in the “relative posts”
- Filtering blog posts by category
- Get Categories of multiple posts
- Show subcategories broken when WP/WC updates
- Display menu in category and sub category
- How to change category labels in different colors?
- Display some WordPress categories as random order
- On main page, in each post, display image depending on post category
- WordPress categories hierachy issue
- Pagination does not work with query_posts()
- Custom file with special code of category widget
- Custom field picture instead of post thumbnail on category page
- Using categories and pages in menus
- Gettind 404 not found wen click the view button for a given category custom post type portfolio
- If I change the taxonomy of a post will it get a new time stamp?
- Check if value is a custom taxonomy category name
- Tracking multiple tags or categories
- How do I add and display a custom image field to a category? [duplicate]
- Category pagination not working in category.php please help me
- Print the associated categories of the current post starting with parent (with option to remove href)
- Add category image before post title on homepage
- Custom EndPoint not working when strip child category in URL
- Display posts in a random order for a specific category
- Why is WordPress adding in a subcategory to my url when it has no parent page?