Created
July 9, 2018 23:53
-
-
Save ejangi/eb1b05d093a3089885ac96b6efb10c4b to your computer and use it in GitHub Desktop.
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
<?php | |
add_filter( 'register_post_type_args', function ( $args, $post_type ){ | |
if ($post_type == 'my-post-type-slug'){ | |
$args['rewrite']['slug'] = 'short'; | |
} | |
return $args; | |
}, 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment