8 comments on “Ip2country

  1. Using your plugin, trying to make an if, else statement depending what country you are at to display a different template part for navigations. For an example, if in the 'United States' use 'x template'. If in the 'United Kingdom' use 'y template'. Else use 'z template'. Any clue how to get it?

    • I think I found a solution but would like another pair of eyes to look at this.

      country_code);
      if ('us') {
      echo get_template_part('nav','template');
      }

      elseif ('uk') {
      echo get_template_part('nav','global');
      }
      ?>

      • Didn't post code right, here it is.
        country_code);
        if ('us') {
        echo get_template_part('nav','template');
        }
        // or

        elseif ('uk') {
        echo get_template_part('nav','global');
        }
        ?>

  2. Hi, thanks for creating such a great plugin. Is there a shortcode that I can use to have the country name displayed on a wordpress site? Many thanks, Brad

    • webvitaly Post author

      Sorry, but plugin does not have such shortcode.
      Ip2country is more for development purposes and gives useful functions for extending other code.

  3. Excellent Plugin.Initially i tried with inserting wp_ip2country table and i got blank.After inserting the table it worked like charm.My simple doubt will it be 100% sure that pick the right country or is there any chance it may miss in some situations..Finally i would say your plugin worth a donation..Really thanks you saved my day..

Submit comment

Allowed HTML tags: <a href="http://google.com">google</a> <strong>bold</strong> <em>emphasized</em> <code>code</code> <blockquote>
quote
</blockquote>

Current ye@r *