WordPress: Override a template when a variable is present in the URL
In very rare cases, one might need to override the default template (although it's a bit dirty to do that).In the functions.php file, add the following code:
function wpa_overload_template( $template ) {
if( isset( $_GET['parameter'] ) ) {
$template = loc...
TBWritten byThomas Bourdin1 min read
In very rare cases, one might need to override the default template (although it's a bit dirty to do that).
In the functions.php file, add the following code: