Created
September 28, 2016 14:44
-
-
Save joshuacharleslake/84be06e35bdff711eb1d1c7cdc7bbc54 to your computer and use it in GitHub Desktop.
wordpress redirect function
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 redirect_unwanted_shop_page(){ | |
if (is_woocommerce('shop')) { | |
wp_redirect( home_url() ); | |
exit; | |
} | |
} | |
add_action('template_redirect','redirect_unwanted_shop_page'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment