Created
May 3, 2016 16:45
-
-
Save louisnovick/824aad31684a3cbadcf30a0e7f481943 to your computer and use it in GitHub Desktop.
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
function wpse_128636_redirect_post() { | |
$queried_post_type = get_query_var('post_type'); | |
if ( is_single() && 'post_type' == $queried_post_type ) { | |
wp_redirect( home_url(), 301 ); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment