Support » Plugins and Hacks » use single2.php if referring site is

  • Hi there folks,

    I ran into a difficult problem – maby somebody here got an idea how to solve that:

    the title describes it best. so basically I want wordpress to use a special single.php (i.e. single2.php) file if the surfer comes from one specific site.
    It must be possible somehow with htaccess rewrite rules but I have no idea how that would look like and how to tell wordpress to use single2.php if site is referring.

    Would be great if someone could please help me out on this.
    Thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)
  • after some searching I came across this plugin:

    I got an option to specify the refering site there and the welcome text but I need to change the whole template file. Maby it’s possible with a modification of this plugin?

    is it possible with the WP conditional tags?
    i.e. <?php if (is_home()) { ?>

    instead of “is_home” use something like “if referring site is”
    or some php referral detection?

    yeah I got it working with this:

    <?php if (strstr($_SERVER['HTTP_REFERER'],"")) { ?>
    <?php } else {
    echo "Internal referrer";
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘use single2.php if referring site is’ is closed to new replies.