Created
July 18, 2016 09:10
-
-
Save hauge75/5110f32185eb2cdf816e4ce514a91221 to your computer and use it in GitHub Desktop.
Rename slug for existing custom post type in childtheme - Wordpress
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
//* change slug for post type | |
$args = get_post_type_object("post_type_name"); | |
$args->rewrite["slug"] = "new_slug"; | |
register_post_type($args->name, $args); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment