WordPress.org

Ready to get started?Download WordPress

Forums

HeadSpace2 SEO
Theme Switcher, Query Strings Throws it Off (1 post)

  1. Andrew S Freeman
    Member
    Posted 1 year ago #

    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' ), '', 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] );
    to
    $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,
    Andrew Freeman

    http://wordpress.org/extend/plugins/headspace2/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 1 year ago by Andrew S Freeman
  • This topic is not resolved
  • WordPress version: 3.5.1

Tags

No tags yet.