Skip to content

Instantly share code, notes, and snippets.

@j-gardner
Last active December 22, 2015 19:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save j-gardner/6518347 to your computer and use it in GitHub Desktop.
Save j-gardner/6518347 to your computer and use it in GitHub Desktop.
Set a custom rewrite slug for Arconix Portfolio
<?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