-
-
Save iHwy/47a28a33763b18b7ee9e5556e8e5fd24 to your computer and use it in GitHub Desktop.
Rename the Genesis Portfolio Slug
This file contains hidden or 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 Portfolio CPT Slug to One of Your own | |
| function change_slug_portfolio_custom_post_type() { | |
| $args = get_post_type_object("portfolio"); | |
| $args->rewrite["slug"] = "your-new-name"; | |
| register_post_type($args->name, $args); | |
| } | |
| add_action('init', 'change_slug_portfolio_custom_post_type', 5); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment