Skip to content

Instantly share code, notes, and snippets.

@Shininglow
Last active May 20, 2022 10:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shininglow/4e94e8bdc9d2fe55666c3f8b88d7f203 to your computer and use it in GitHub Desktop.
Save Shininglow/4e94e8bdc9d2fe55666c3f8b88d7f203 to your computer and use it in GitHub Desktop.
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment