Skip to content

Instantly share code, notes, and snippets.

@davoraltman
Created July 19, 2017 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davoraltman/631b3ec87f2bde763a7a86f139c7ef04 to your computer and use it in GitHub Desktop.
Save davoraltman/631b3ec87f2bde763a7a86f139c7ef04 to your computer and use it in GitHub Desktop.
Change resume slug
add_action( 'init', 'jm_update_resume_slug' );
function jm_update_resume_slug( ) {
$resume_args = get_post_type_object('resume');
if ( ! empty( $resume_args ) ) {
$resume_args->rewrite = array(
'slug' => 'cv',
'with_front' => false,
'feeds' => false,
'pages' => false,
);
register_post_type( $resume_args->name, $resume_args );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment