Last active
August 29, 2015 13:57
-
-
Save bericp1/9517716 to your computer and use it in GitHub Desktop.
Redirect from a page template to /badge-landing if the query string is empty. Should be placed at the top of the page template, within the PHP tags, below the comment block defining the templates name and whatnot, but above `get_header()` or any other function that echos or outputs anything.
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
if(!isset($_SERVER['QUERY_STRING']) || trim($_SERVER['QUERY_STRING']) === ''){ | |
header('Location: /badge-landing/'); | |
exit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment