Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Location Based Content

Posted on 2015-02-11
7
Medium Priority
?
94 Views
Last Modified: 2015-02-11
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.
0
Comment
Question by:oo7ml
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 17

Accepted Solution

by:
Chris Millard earned 2000 total points
ID: 40603047
It looks like you could use the WP GeoCode plugin. Have a look at this article:-

http://premium.wpmudev.org/blog/daily-tip-how-to-display-wordpress-posts-based-on-a-users-geolocation/
0
 

Author Comment

by:oo7ml
ID: 40603074
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>
0
 
LVL 17

Expert Comment

by:Chris Millard
ID: 40603125
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]
0
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 

Author Comment

by:oo7ml
ID: 40603166
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?
0
 
LVL 17

Expert Comment

by:Chris Millard
ID: 40603173
[wpgc_is_not_country_name" country_name="United Kingdom, United States, Ireland, Australia"]
0
 
LVL 17

Expert Comment

by:Chris Millard
ID: 40603187
or you can do it based on country codes:-

[wpgc_is_not_country_codes" country_codes="US,GB,AU,IE"]
0
 

Author Closing Comment

by:oo7ml
ID: 40603194
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
0

Featured Post

RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question