Skip to content

Instantly share code, notes, and snippets.

@braddalton
Forked from JoshFialkoff/gist:6312587
Last active December 21, 2015 13:29
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 braddalton/6312626 to your computer and use it in GitHub Desktop.
Save braddalton/6312626 to your computer and use it in GitHub Desktop.
/* redirect for slide pages */
add_action('template_redirect', 'slide_template_redirect', 1);
function slide_template_redirect(){
if ( in_category('homepage-slider') ) {
if(get_field('landing_page')){
wp_redirect( get_field('landing_page'), 301);
exit;
}
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment