You have a post type called “press”? Using a post type and page with the same slug causes a conflict. If you must have a “press” page slug, the base term in permalinks for your post type cannot also be “press”. If you change the post type’s base term, after making the change in code, visit the permalinks settings screen to get WP to recognize the new term. No need to change or save anything, just load the screen.
Thanks, Bcworkz for responding.
Can you please tell me where to make the changes for the same? Should I make the changes in the functions.php file? If so what code to change?
Regards
Jerome
The issue is resolved now. Found a solution to this.
1. To change the slug (https://zemez.io/wordpress/support/knowledge-base/changing-custom-post-type-slug/)
(a) Go to functions.php and paste this code at the end of the file:
add_filter( 'your-post-type_post_type_args', '_my_rewrite_slug' ); // Here replace "your-post-type" with the actual post type, e.g., "cherry_services", "cherry-projects"
function _my_rewrite_slug( $args ) {
$args['rewrite']['slug'] = 'our-services'; // Replace "our-services" with your preferable slug
return $args;
}
(b) Chane the slug accordingly
(c) Refresh the permalinks in the dashboard.
2. To disable the slug from showing the archive page (https://wordpress.stackexchange.com/questions/135146/resolve-a-custom-post-type-name-vs-page-permalink-conflict-same-slug)
(a) Find the below snippet for the particular post type and set the value as false.
'has_archive' => false,
(b) Refresh the permalinks in the dashboard.