Created
February 23, 2015 20:21
-
-
Save matheuscl/eb9bd532e3c1391f4fad to your computer and use it in GitHub Desktop.
Add custom Pretty Link to Custom Post Type or Custom Taxonomy
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 custom Pretty Link to Custom Post Type or Custom Taxonomy | |
* | |
* Change @@@ to your CPT or CT slug... | |
* | |
* Change ??? to custom link like example or anything else... | |
* | |
*/ | |
function wp_permastructs(){ | |
global $wp_rewrite; | |
$wp_rewrite->extra_permastructs['@@@']['struct'] = '???/%@@@%/'; | |
} | |
add_action( 'init', 'wp_permastructs' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment