Skip to content

Instantly share code, notes, and snippets.

@mjangda
Forked from whyisjake/perm.php
Created August 20, 2012 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save mjangda/3406287 to your computer and use it in GitHub Desktop.
Save mjangda/3406287 to your computer and use it in GitHub Desktop.
New Permalink
add_filter( 'pre_post_link', 'make__permalink', 10, 2 );
function make_new_permalink( $permalink, $post ) {
if ( 'page' == $post->post_type && in_array( $post->page_name, array( 'home-page', 'home-page-include' ) ) ) {
$permalink = 'http://makezine.com';
}
return $permalink;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment