Changing background in relation to IP address
-
Hello there,
I’d like to know if it is possible to change background color in relation to IP address.
For instance, someone comes to my homepage, then goes to another page, and comes back to the homepage.
Is there something like “if same IP address on homepage, change color to #FFFFFF”, or something like that ?
I hope you can understand my question.
Thank you in advance for your answers,
Best regards,
ZoeThe blog I need help with is: (visible only to logged in users)
-
Hello!
That is doable, but not here at WordPress.com as it requires some custom PHP or Javascript code. If you definitely need that feature, you’ll need a WordPress.org site.
I hope that helps, and let me know if you have any other questions!
-
Zoe – this sort of modification would be possible with a WordPress.com Business plan, which allows you to upload third-party code. If you decide to go that route, you could try a plugin like this one, for the geo-detection:
When enabled on the options page, it adds CSS classes to the body tag such as geoip-country-DE and geoip-continent-EU.
You could then hook into those classes to add some specific CSS.
Let me know if you need further help.
-
And if your IP detection is not geo-based, you’d need to either find a different plugin or write some custom code.
-
-
My pleasure! I’ll mark this thread as resolved but feel free to start a new one if you need help with anything else.
- The topic ‘Changing background in relation to IP address’ is closed to new replies.