Created
December 16, 2016 10:46
-
-
Save vovadocent/f6ede2b0bce8bf7a40cbf82f7f12c769 to your computer and use it in GitHub Desktop.
Post type archieve edit permalink
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 | |
add_filter( 'post_type_archive_link', 'fix_post_type_archive_link', 10, 2 ); | |
function fix_post_type_archive_link( $link, $post_type ) { | |
if($post_type == 'scripts'){ | |
$link = str_replace('/%some-slug%', '', $link); | |
} | |
return $link; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment