Link to home
Start Free TrialLog in
Avatar of oo7ml
oo7ml

asked on

Location Based Content

Hi, i am in the process of updating a client's website.

They have 4 different company Facebook accounts / pages:

UK
Ireland
US
Australia

They have a Facebook icon / link in the header of their website, and they want to change the link based on where they user is viewing their website from. If the user is based in the US, display the US Facebook Page link etc...

Their site is wordpress based. Can anyone recommend a way of accomplishing the above? Thanks in advance for your help.
ASKER CERTIFIED SOLUTION
Avatar of Chris Millard
Chris Millard
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of oo7ml
oo7ml

ASKER

Cool, i've just looked at that, but can't seem to find a way how you could adjust the following line for each of the 3 countries:


<a href="https"//facebook.com/page">Go To Facebook</a>
Take a look at https://wordpress.org/plugins/wpgeocode/ - it looks like you could use the Shortcodes to do what you want.

e.g.:-

[wpgc_is_country_name" country_name="United Kingdom"] <a href="https"//facebook.com/UKpage">Go To Facebook</a>[/wpgc_is_country_name]
Avatar of oo7ml

ASKER

Ah cool, thanks Chris... one final question :-)

What if the user is not from any of those questions, how do i use a catch all outside of those 4 listed countries?
[wpgc_is_not_country_name" country_name="United Kingdom, United States, Ireland, Australia"]
or you can do it based on country codes:-

[wpgc_is_not_country_codes" country_codes="US,GB,AU,IE"]
Avatar of oo7ml

ASKER

Thanks Chris, i presume their IP registry us updated on a regular basis as i understand that IP database lose their accuracy every few weeks