Last active
December 22, 2015 19:19
-
-
Save j-gardner/6518347 to your computer and use it in GitHub Desktop.
Set a custom rewrite slug for Arconix Portfolio
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
<?php // DO NOT include the opening php tag | |
add_filter( 'arconix_portfolio_defaults', 'my_custom_rewrite' ); | |
function my_custom_rewrite( $defaults ) { | |
$defaults['post_type']['args']['has_archive'] = true; | |
$defaults['post_type']['args']['rewrite']['slug'] = 'CUSTOMREWRITE'; | |
// change CUSTOMREWRITE to your desired slug -- http://yourdomain.com/CUSTOMREWRITE | |
return $defaults; | |
} | |
// Go to Settings -> Permalinks and click Save Changes for this code to take effect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment