I recently used the Theme Switching part of your plugin for a landing page for Google AdWords. Unfortunately, the query string at the end of the AdWords-generated URL made it so my alternate theme wouldn’t display for the landing page.
Changing line 45 of modules/page/theme.php from
$url = str_replace( get_bloginfo( 'url' ), '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
$url = str_replace( get_bloginfo( 'url' ), '', 'http://' . $_SERVER['HTTP_HOST'] . strtok($_SERVER["REQUEST_URI"],'?') );
Fixed the issue. I wish there was an easier way to open a pull request in Trac.
Thanks for everything,
- The topic ‘Theme Switcher, Query Strings Throws it Off’ is closed to new replies.