Last active
December 22, 2015 02:58
-
-
Save trevorgreenleaf/6406547 to your computer and use it in GitHub Desktop.
Allows you to use a custom page for a given Url. With out having to setup a page and template in wp
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 page_custom() { | |
if($_SERVER['REQUEST_URI'] == '/register'){ | |
// path to the file | |
include(get_template_directory().'/users/register.php'); | |
} | |
} | |
add_action('template_redirect', 'page_custom'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment