Variable Logos

Posted in

I am using the Emmet Pro theme and Affiliates Pro plugin.

I know very little about PHP but I was able to successfully replace the theme’s header logo with a variable logo based on the referrer_id. Ex: ../affiliate_logo2.png, or ../affiliate_logo3.png, etc…

Basically, each affiliate link will show the affiliates logo in the header of the theme on ever page. When the website is visited without an affiliate link the main logo will appear: affiliate_logo.png

The problem now is that if you visit an affiliate link (https://myrealadvantage.com/?affilaites=2) and then switch back to the non affiliate main URL (https://myrealadvantage.com/) the last affiliate visited appears as the main logo. For 95% of the world, this should not matter because they won’t be visiting both the affiliate link and the main URL but just in case, I’d like the affiliate_logo.png to appear as the default, no affiliate logo.

Thank you for your assistance with this.

Here is the revised header.php code.

[edited]

One Response to Variable Logos

  1. antonio July 24, 2017 at 7:00 am #

    Hi Ron,
    Sorry the comments system filters the php code, please use pastebin.com for give us your code.
    Maybe you can use part of this code as reference.
    Kind Regards,
    Antonio B.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share