Skip to content

Instantly share code, notes, and snippets.

@caercam
Created October 10, 2014 20:58
Show Gist options
  • Save caercam/773f048663082e4c4b00 to your computer and use it in GitHub Desktop.
Save caercam/773f048663082e4c4b00 to your computer and use it in GitHub Desktop.
function wpmoly_suffix( $post_link, $post, $leavename, $sample ) {
if ( 'movie' != get_post_type( $post ) )
return $post_link;
$post_link = str_replace( $post->post_name, $post->post_name . '-value', $post_link );
return $post_link;
}
add_filter( 'post_type_link', 'wpmoly_suffix', 10, 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment