While it’s possible to manipulate CPT data after registration it’s not very “clean” and harder for some things.
Specifically for hierarchical setting registration adds it to rewrite right away:
if ( $args->hierarchical )
add_rewrite_tag( "%$post_type%", '(.+?)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&pagename=" );
else
add_rewrite_tag( "%$post_type%", '([^/]+)', $args->query_var ? "{$args->query_var}=" : "post_type=$post_type&name=" );
So you’ll have to redo this really carefully and make sure it survives flushing rewrite rules properly.
Altogether it would be more robust to look into forking or extending that part of plugin in question and just register CPT like you need it to.
Related Posts:
- Use template_include with custom post types
- Combining Multiple Taxonomies in one URL
- Taxonomy term in permalink
- How to give a CPT (custom post type) a date based url
- Numbering sections and block-level elements in wpautop(); WordPress as CMS for long-form writing;
- Loading Custom Post Type Events into jQuery-based FullCalendar?
- get_edit_post_link() not working as expected when passed id in plugin
- ‘No pages found’ in Dashboard after registering custom taxonomy
- Custom Post Type – Same Post Name, Different Post Type
- Custom Post Type ‘hierarchical’ Help!
- Issue with saving custom post type when editor is removed
- How would I leverage custom Taxonomies in this scenario?
- Using custom post types in submenu + custom title
- convert Custom Fields Option-Values to Tags/Taxonomy
- How to display recent posts added in custom post types
- Excluding post type from WordPress link builder
- Dynamic iCal generator outside/inside wordpress
- 2 different post->IDs for single page load only in Firefox
- How to show custom (checkbox) field value in admin post list?
- Display custom post types with custom date field value (before today) & order by custom date field
- How to have the right design for a custom post type without accessing themes
- Passing parameters to WordPress static front page
- Dynamic Custom Post Type Plugin
- How to display custom post types using single-[post_type] and archive-[post-type]?
- Remove All, Published and Trashed Post Views in Custom Post Type
- How can I filter by taxonomy on a custom post type’s page?
- Using pre_get_posts to filter one loop in a multiloop archive
- How to Duplicate (multiple meta box)?
- Custom Post Type: Upload Multiple Images
- Displaying Posts of a Custom Type
- How Do You Add a Second “Posts” Menu to Your Dashboard?
- CPT issue: Warning: call_user_func_array() expects parameter 1 to be a valid callback
- Conditional Query of Custom Post Type and custom taxonomy
- Getting template_include to work when allow_url_include is off?
- Is $object_type truly required with register_taxonomy()?
- Query & Order posts by custom fields
- How to target a specific custom post type post and its all children and grandchildren?
- output custom post types on front-page.php
- Custom Post Type Video – Online/Offline
- Suggested Post and Taxonomy structure
- remove base slug from hierarchical custom post type
- Use custom walker to add taxonomy terms to main nav menu
- frontend image post uploader
- WP_Query orderby and tax_query
- Permalink misbehaving in Custom Post Types
- admin-ajax.php GET custom-post titles
- How to group search results by post type and only if post type result is not empty?
- How to see posts in taxonomy endpoint
- WordPress hook which triggers on post import
- Allow contributor to edit own posts after published, without plugin
- Show current user posts in custom post type query
- Custom taxonomy template shows 404 Error
- Dynamic assign a custom template to custom post type posts
- Custom post type in Custom widget – $listItem
- Get all metadata for a given custom post type
- Custom Post Type with modified permalink structure results in 404
- Custom Post Type Pretty Structure
- Add term for custom taxonomy from front end
- delete duplicate meta_value with same post_id
- CPT archive page – show one post from each taxonomy term
- Subpages Permalinks Issues
- Custom post-type custom query – show all posts
- Display custom post type from template
- How do I make a request in my browser to search the CPT taxonomy?
- Change Text in Admin Panel
- Adding a location field to buddypress activity
- Get dropdown child categories from parent category of custom post type
- How to Grab Anime info using Jikan API and fill the value in Metabox
- How to generate auto shortcode for custom post type same as Elementor Template?
- Changing default admin column sorting to an ACF Date Picker field
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- Query a Custom Post Type using SELECT that has ACF fields to compare dates
- I want to create a metabox under custom taxonomy
- How to output and alert message when updating a post
- Getting 404 on child page with pre_get_posts() on custom posts
- Custom post type and custom page name
- Post list displaying wrong in Chrome and Firefox
- Set different posts_per_page for custom post type/taxonomy
- Return Additional Fields When Selecting Max Value of Meta Key from wp-postmeta table
- Hierarchical Custom Post Type Walker?
- Changing menu label to post name for custom post type
- issue with custom post type feed
- Creating adminable dynamic filtering on custom post type
- Featured image in custom post is being disabled
- Remove Custom Capability
- Use the page picker from wordpress menu creation page
- CPT and metabox: create multi checkbox by using array?
- Get posts in same category not working
- Permalinks when using Custom Post Type with static page for archive
- Query Only Show Text on Posts With Certain Taxonomy Tag
- Remove ?preview=true from the address of custom post types
- Use only selected regular categories for a Custom post form
- Custom Post Type to Upload Images
- WordPress show custom post type on homepage
- How to make a template for a specific post of a custom post type?
- Hierarchical Custom Post Types
- ACF select box css color change
- Paginate yearly archives for a custom post type
- Why does wp_generate_uuid4() timeout?
- Delete Term from Custom Taxonomy using wp_delete_term isn’t working