• Hello John,

    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' ), '', 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    to
    $url = str_replace( get_bloginfo( 'url' ), '', 'https://' . $_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,
    Andrew Freeman

    https://www.ads-software.com/extend/plugins/headspace2/

  • The topic ‘Theme Switcher, Query Strings Throws it Off’ is closed to new replies.