I just observed the same problem, and fixed it by using the “admin_init” Action instead. I only want it to fire in Admin, but if you want it to fire for Public as well as Admin, simply use two add_action’s, one for wp and admin_init, though I would make it conditional:
if ( is_admin() ) {
add_action( 'admin_init',...
} else {
add_action( 'wp',...
}
Related Posts:
- Hierarchical taxonomy UI
- Ordering Posts with Custom Taxonomy Terms Array
- Dynamically tax_query terms
- Can I limit term selection to one plus parent?
- Taxonomy archive showing no results
- What is the action hook that deletes a taxonomy term from the backend? And how to retireve the term id before deleting it?
- Create alphabetical Pagination for custom taxonomy?
- Tax query array terms display out of order
- How can I get the term_id from the action hook ‘set_object_terms’?
- How to filter the terms of custom taxonomy by author id in admin panel
- “tax_query” parameter not working with WP_Query
- get_posts assigned to a specific custom taxonomy term, and not the term’s children
- How can I get only parent terms?
- Retrieve posts by term id custom query
- Change order of Custom Taxonomy List
- Get the the top-level parent of a custom taxonomy term
- get_the_term_list without links in 3.1
- Inserting terms in an Hierarchical Taxonomy
- get_terms – only top level
- How to only list the child terms of a taxonomy and not their parents?
- How to prevent new terms being added to a custom taxonomy?
- Order get_terms using a Custom Field
- get_term_children for immediate children only (not grandchildren)
- Query users by custom taxonomy and user role
- Custom Taxonomy and Tax_Query
- Determine Term depth
- How to get current term in my custom taxonomy in WordPress?
- Is there a way to ‘Lock’ a Taxonomy?
- Hide the term description on the term edit page, for a given taxonomy
- Order terms by term_order
- get_term_by not working when in functions.php
- Creating a non-removable taxonomy term
- Get value in custom field with taxonomy [closed]
- Get second level terms of custom taxonomy
- pre_get_posts with tax_query causes empty result
- Can I lock down custom taxonomies on a parent term level, but not a child term?
- Including all terms in wordpress tax_query
- Get only the first term by taxonomy
- Exclude specific slug in ‘get_terms’
- Large taxonomy (2000+ terms), causing WordPress to hang
- Custom order of terms for custom taxonomy in admin and website
- Is there a way to disable a term rather than deleting it?
- Modify Term Update Redirection
- Best pratice to make taxonomy terms translatable without changing slugs?
- Front End Post Save Child terms
- Return only the custom sub-term for custom post type, do not echo term-parent
- wp_insert_term is adding a term that has no name
- Taxonomy slug by term ID
- Check if current term is a child of another term
- Is there a way to import terms into WordPress?
- get_terms() doesn’t return empty terms even though hide_empty is false
- How to add a style to taxonomy edit page
- Get terms from multiple taxonomies
- Get taxonomy name of current post
- Formating the_terms() function output
- Using tax_query creates a 1 = 0 or 1 = 1 in $wp_query->request
- get_terms() returns an empty array
- wp_insert_term auto unique name
- get_terms showing link to category even if all posts are drafts
- Determine if Term has Grandparent/Great-Grandparent
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- Dropdown: Display terms from B only if has relationship with a term A selected
- Non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue
- Retrieving custom taxonomy in order, but excluding specific tax IDs
- search query within custom taxonomy term, post title and meta field
- wp_get_object_terms – How can I order the resulting array by hierarchy?
- Get main parent categories for a product
- Get current term’s ID
- Is it possible to get a Previous/Next Taxonomy term archive URL?
- Showing posts by collection of specific terms and texonomy
- get taxonomy terms for parent and child
- Taxonomy query for children of parents
- show term description instead of list terms of custom taxonomy
- WP_insert_term how to insert multiple values as taxonomny term?
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- Group posts that matches a term in a loop
- term_link() filter or rewrite and howto?
- How to get the top most term (top ancestor) of a custom taxonomy child term?
- Remove description in custom taxonomy edit screen
- tax_query not working on main query
- Display Custom Taxonomy Terns ordered by meta_value
- Separator for multiple terms
- Contact Form 7 – Populating dropdown list with terms relative to the post
- Custom Taxonomy terms with latest post ordered by date pagination issue
- How to set hierarchical terms to a post using wp_set_object_terms
- Echo taxonomy term meta on author.php
- get_the_term_list without specific category
- Hierarchical display of custom taxonomy
- Listing child terms of parent term
- Display the taxonomy name of the current term
- Custom taxonomy term as class?
- How to edit/remove a term that’s in multiple taxonomies?
- Create Admin Only Taxonomies?
- List taxonomy / category count showing list published posts only
- How to create a theme template for the taxonomy “root”
- How to display term description in empty terms archive?
- Advanced custom fields – taxonomy terms images [closed]
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- Require a Custom Taxonomy to be checked
- Checking if a Page has an Associated Term?