Created
July 19, 2017 06:14
-
-
Save davoraltman/631b3ec87f2bde763a7a86f139c7ef04 to your computer and use it in GitHub Desktop.
Change resume slug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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