In the code you posted, the filter ctc_post_type_item_args
gets applied to the $args
array before it is passed into register_post_type()
.
Putting a function into your themes functions.php
and hooking it to the filter should do the trick:
function wpse_191003_ctc_post_type_item_args( $args ) {
$args['rewrite']['slug'] = "your_new_slug";
return $args;
}
add_filter( 'ctc_post_type_item_args', 'wpse_191003_ctc_post_type_item_args' );
Related Posts:
- Redeclare/Change Slug of a Plugin’s Custom Post Type
- Change custom post type slug from plugin options
- How to target a specific custom post type post and its all children and grandchildren?
- WordPress page not showing up – replaced with last 10 posts?
- Custom permalink rewrite rules – how do I fix this?
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Is it possible to use a post name in a custom post slug?
- How come Featured Image isn’t showing up in my Custom Post Type?
- How to use a custom post type archive as front page?
- Set posts of a custom post type to be private by default?
- custom slug for custom post type
- Get list of all registered post types slugs
- clients list using wordpress
- Taxonomy archive with same slug as custom post type?
- Find callback function for custom taxonomy metabox
- Date archives for custom post type
- How can I add dropdown widget/box to admin post page?
- Taxonomy page returns 404 page not found
- Custom Post Type pagination when CPT ‘rewrite’ rule and a page have the same slug
- Remove Slug from Custom Post Type results in 404
- Limiting number of custom posts shown on taxonomy page
- Rewrite CPT slug with two taxonomy slug instead of one
- WP query by custom post type slug/name
- Append taxonomy terms as class names in markup?
- Display only custom post type count for current author on the “At a Glance” dashboard widget
- Custom Taxonomy breaking pages permalinks
- Rewrite rules for custom post type slug
- GravityForm: Populate Dropdown with custom post type [closed]
- Make slug as ID Number for custom post types
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Custom post type and taxonomy slug issue
- WooCommerce product search titles only
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Custom Taxonomy Permalinks Redirection
- Add custom column in custom post type edit page
- I did group my search results by post type, but how can i give each of them its own order?
- custom post type not showing in menu
- Append date to custom post type url slug
- CPT custom archive template does not get loaded
- How to add a post slug to a url?
- Change CPT archive title
- I need to add endpoint for wordpress categories
- Custom rewrite url category
- Featured image overlay when changing post status
- Allow duplicate slugs for custom post type with taxonomies
- Nested Custom Post Type or Custom Post Type Parents?
- Programmatically rewriting slug through functions.php but returns 404
- Create a custom php page and load it at a specific slug
- Hide a widget inside a div on specific type of post
- How to prevent a CPT’s slug and page slug from conflicting with each other?
- Custom Post Slug same as Parents Category Slug
- Warning: Invalid argument supplied for foreach() [closed]
- Custom post type isn’t working
- Auto Slug Generation for Custom Post type
- Slug Confusion Between Post and Custom Post types?
- custom post for slider
- Different slug taxonomy for two different CPT
- How can Custom Post Type and a page have the same slug?
- How to inherit field value from parent post into in child / sub post
- Changing slug of all posts
- WordPress different templates for same type custom post (but different slug)
- Custom post type’s posts are not showing anywere but in xml sitemap
- Custom Post Type Advanced Slug
- Get current user id
- Apply template by path/slug related to custom post type?
- Show current user posts in custom post type query
- Custom post type in Custom widget – $listItem
- Custom posts – tag pagination
- Adding custom post formatting options in custom post types
- Custom meta box in custom post type not working
- Under What Conditions Can I name my CPT the same as my CPT Page?
- Function to add custom HTML into head in custom post-type list page
- Submit Custom Postypes from frontend
- Need help with Custom Post Types and Taxonomies
- set object terms after some some time of published post – functions.php
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Pagination not working in custom post type. Help
- How to add specific terms in a custom post type?
- Limit custom post type to the authors only on front-end!
- Remove custom taxonamy slug with pagination
- Create posts inside CPT post
- Problem with multi checkboxes value in metabox?
- Add %post_id% to slug of custom post type and prevent the “unique slug” thing that WP does?
- add .html to custom post type with WPML
- Populate custom post type/custom fields from an external database
- How to sort custom post’s category by id from the theme’s function.php?
- Work and Display a Custom Post Type as a normal Post
- Custom Field to post_title
- Post Custom & Taxonomy 404 error
- How To Display Category list from Portfolio post type plugin?
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Query custom post type and showing its content
- Can’t make permalink of CPT work
- Allow authors to create article image
- Comments are not working on Custom Post Type
- Custom Post Type with multiple Custom Taxonomies / Hide Taxonomy Slug from URL
- I want to show a list of posts under specified categories
- Custom slugs with dates & IDs on Custom Post Type
- Add post id to url instead of WordPress default -2 suffix
- Taxonomy Archive URL + Template