Created
March 11, 2015 14:26
-
-
Save tarikcayir/29682bf8c693646be2c1 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
<?php | |
add_action( 'template_redirect', 'redirect_all_page' ); | |
function redirect_all_page() { | |
if ( !is_home() ) { // get_the_ID() != 'home_page_id' | |
wp_redirect( home_url(), 301 ); | |
exit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment