register_taxonomy
triggers the action registered_taxonomy
immediately after it’s registered, which gives you the arguments it was registered with. As long as the taxonomy key doesn’t change, you can hook that action, modify the arguments, then re-register it.
function wpd_update_taxonomy_args( $taxonomy, $object_type, $args ){
if( 'plugin_tax' == $taxonomy ){
// remove this action so we don't create an infinite loop!
remove_action( current_action(), __FUNCTION__ );
// change arguments
$args['rewrite'] = array( 'slug' => 'foobar' );
// re-register
register_taxonomy( $taxonomy, $object_type, $args );
}
}
add_action( 'registered_taxonomy', 'wpd_update_taxonomy_args', 10, 3 );
Related Posts:
- Possible to register multiple custom taxonomies in one function?
- Combine multiple custom user taxonomy in single url
- Custom taxonomy forms for user profile
- Why does a new taxonomy term get created when I assign an existing term to a post?
- Custom Taxonomy index/archive hierarchy
- Taxonomize taxonomy terms?
- Tracking the name of a custom taxonomy
- Custom field with terms from another taxonomy programmatically
- Taxonomies and subtaxonomies relations
- Custom Taxonomy Not Being Recognized by is_tax()
- set_object_terms for custom taxonomy in custom post type – not working
- Templates files for custom post type with custom tags
- Sort Taxonomy List by Custom Values
- Register custom taxonomy from a Advenced custom field option page
- Prevent random entries in hierarchical false taxonomies
- How to use taxonomies on attachments with the new Media Library?
- Add custom taxonomy fields when creating a new taxonomy
- How to display custom taxonomies in posts?
- Creating Custom Taxonomy without mapping to any post type
- Exclude specific slug in ‘get_terms’
- wp_insert_term – parent & child problem
- Widget to display custom taxonomy tag cloud
- Hook to process a new taxonomy tag before it is created?
- Return only the custom sub-term for custom post type, do not echo term-parent
- Get total number of comments from posts in a specific custom taxonomy
- Multiple users – only allow them to manage their own terms for custom taxonomy when logged in
- wp_options table value
- Custom Taxonomy Only Showing Top Level Terms in Admin?
- Is it possible to get a Previous/Next Taxonomy term archive URL?
- How do I display a tag cloud with both post tags AND a custom taxonomy?
- Adding session variable and/or cookie based on user-selected input
- How to display term description in empty terms archive?
- Checking if a Page has an Associated Term?
- Create Child Taxonomies
- Query Posts by taxonomy/Taxonomy Child Custom order
- 404 for a custom taxonomy?
- Current category link filter
- display taxonomy slug from term ID
- Make a taxonomy column sortable in the admin?
- Register Taxonomy earlier so it can be used in functions.php and admin-ajax.php
- Redirect all child taxonomy to its parent
- How to display custom taxonomy images on index.php?
- How do I taxonomy terms based on terms they are used alongside?
- get_term and get_term_by return null or false, even though term exists
- How can I populate a select element with terms from a custom taxonomy and filter post results?
- How do I list the pages of a custom taxonomy?
- Get number of post who belongs in two taxonomies!
- Add Image Uploader In Admin Panel
- Tell the difference between a term and page when they have the same ID
- taxonomy tax-name archive
- WordPress thinks my custom taxonomy pages are search pages #seo
- How to use multiple archive templates for a taxonomy?
- Adding custom taxonomy in my existing category URL
- Custom Taxonomy Query
- How to get posts which must match both custom taxonomies?
- How to add images to taxonomy terms? [duplicate]
- Why get_page_template() doesn’t show taxonomy template file name?
- one post per term taxonomy
- How can I change the output display of my pagination?
- Get name of taxonomies of current page
- Custom Taxonomy template not display
- How to get attached image to taxonomy..?
- How to get list of only custom taxonomies?
- How can I get Taxonomy Images to work with ‘orderby’ argument?
- Use wp_list_categories to list parent categories from actual term
- Amend taxonomy to search in wordpress admin
- Unique taxonomy for post
- Trash Bin for Categories?
- How to add a dynamic dropdown derived from custom taxonomy
- Retrieve the child terms by having the parent’s information
- add pagination in wordpress page template
- problem : Custom taxonomy template not showing
- How to create a non removable taxonomy term?
- Custom dropdown list taxonomy not saved
- How to get all the terms from a custom hierarchical taxonomy via REST api?
- How to show category list in WordPress
- Get post meta value outside of the loop
- Unable to create a new taxonomy
- Change link of taxonomy when get_the_term_list( is used?
- generate random slug when adding taxonomy
- transfer two existing taxonomy terms into one custom metabox
- Custom taxonomy shows full articles
- How to add all existing Custom Taxonomy to Admin Menu Creations Interface?
- Why get_terms() behaves strangely when being called in admin (for use in meta box)?
- qtranslate-x problem with custom term description
- Creating a Taxonomy Page [duplicate]
- Change order custom taxonomy
- Looking for suggestions on creating simple database (Help!!)
- Extra fields on categories that is available via the WP-API?
- Custom taxonomy – query returns an error
- List of taxonomy archive index page links
- Get Posts with matching lowest taxonomies
- Any way to make custom taxonomy field searchable?
- query posts returns 10 records
- Insert taxonomy term to different table
- Getting taxonomies specific to categories
- Remove Tag Cloud Words from Custom Taxonomy
- How to add/enqueue Custom CSS for a custom taxonomy page?
- wp_get_object_terms count on taxonomies within an category archive
- Taxonomies starting with a hyphen (minus) to assign B.C. dates to a post