Created
November 7, 2018 11:07
-
-
Save celticwebdesign/541e0dee8616e50a034b2b71a0069caf to your computer and use it in GitHub Desktop.
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
function my_page_template_redirect() | |
{ | |
if ( is_category( 'uncategorized' ) ) { | |
$url = site_url( '/' ); | |
wp_safe_redirect( $url, 301 ); | |
exit(); | |
} | |
} | |
add_action( 'template_redirect', 'my_page_template_redirect' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment