This is what I want to do

  1. User accesses the website from US or UK or X country.
  2. User gets redirected to a particular edition of the magazine(online) depending on the country that he/she is accessing the website from.
  3. The different editions are nothing but different homepages, that display the content which are more relevant to a particular user group.

In a nutshell, I know I will have to redirect users based on ip addresses to particular pages. But what I am not able to do is, create different homepages within the same theme. Moreover, I can control only one home page from back end, how do I create multiple home pages that I could control separately.(By Controlling the homepage I mean, setting up the categories and Menus).

The website is http://www.thehardtackle.com

Although I have put up the website my self, I am not a web developer. Would be helpful if someone can direct me to open source resources or plugins.

2 Answers 2


For example: I'm a Hungarian user, but my IP shows I'm in Germany while I use an English browser. The most convenient would be English for me, because that is my choice.

There's a PHP superglobal variable, called $_SERVER. It stores information about the server running the page and about the client who requested the page. One string of this array's parameters is called HTTP_ACCEPT_LANGUAGE, sent by the browser, which in my case will be "en". It can be accessed from PHP as: $_SERVER['HTTP_ACCEPT_LANGUAGE'].

This can be used to get the specified content for example with a custom field which contains values what this string can be.

Unfortunately I don't have the time right now to create a complete example, but if you're interested in this method, I'll prepare one.


I suggest you checkout some multilingual plugins for Wordpress. For example WPML (a commercial plugin) does what you are looking for. For a free option try qTranslate.

Once you have your different languages homepages, you can apply different templates to them to show what you want independently. This is handled more effectively by WPML, as it really creates different posts by language for a same page.


If the multilingual part is not your priority, the maybe this plugin would be enough : WordPress GeoTargeting Plugin

You could also simply create a Javascript redirection using GeoIP.js for example.

  • Thanks for the recommendation, although the WPML does take care of the Language switching, its not my top priority. Actually, I wan to configure the different widgets on the homepage depending on the Country version. Right now I can configure every widget on the home page through back end, but that way If I add or remove a widget from the home page, it will get reflected in all the versions of Wpml. This is not what I want. Commented Jun 28, 2011 at 9:18
  • @Anurag Upadhyaya, it would get reflected on each version unless you create a different template for each page, then you'd have all the control you need. But see the updated answer for some other methods you could use.
    – mike23
    Commented Jun 28, 2011 at 9:32
  • 2
    One of the plugins WPML recommends (wpml.org/2011/03/howto-display-different-widgets-per-language) for use with widgets is Widget Logic (wordpress.org/extend/plugins/widget-logic).
    – user2015
    Commented Jun 28, 2011 at 11:04
  • I have not looked into the plugin but it sounds good. I ll try to put an IP check for particular widgets. If that is possible, I will not have to make a different templates altogether for different countries, since the widget will only get displayed if the filter allows it. Thanks a ton. Commented Jun 29, 2011 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.