Created
February 1, 2018 04:07
-
-
Save primedime/9e2498437a4b911794ed5fe7923c5461 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 my_template( $template ) { | |
$url = 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; | |
// check if the page url contains ?id= | |
if( strpos($url,'?id=') !== false ){ | |
if ( $new_template = locate_template( array( 'page-company-profile.php' ) ) ) | |
return $new_template ; | |
} | |
return $template; | |
} | |
add_filter('template_include', 'my_template'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment