{"id":1084,"date":"2020-03-30T01:38:54","date_gmt":"2020-03-30T01:38:54","guid":{"rendered":"http:\/\/shaplakanon.com\/wpsupport\/?p=1084"},"modified":"2020-03-30T01:40:17","modified_gmt":"2020-03-30T01:40:17","slug":"how-to-show-content-based-on-visitor-country","status":"publish","type":"post","link":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/","title":{"rendered":"How to show content based on visitor country?"},"content":{"rendered":"\n<p>There are lots of plugins available on wordpress to show content based visitor country. Recently i worked on such a project and use a free plugin, which worked great. <\/p>\n\n\n\n<p>The plugin is named <a rel=\"noreferrer noopener\" aria-label=\"Geolocation IP Detection (opens in a new tab)\" href=\"https:\/\/wordpress.org\/plugins\/geoip-detect\/\" target=\"_blank\">Geolocation IP Detection<\/a>. You can download and use it free from wordpress plugin directory. This plugin has lots of data sources integration option.<\/p>\n\n\n\n<p>\n\nYou can use one of these data sources (see&nbsp;<a href=\"https:\/\/github.com\/yellowtree\/geoip-detect\/wiki\/FAQ#which-data-source-should-i-choose\">comparison<\/a>):<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Free (default source):&nbsp;<a href=\"http:\/\/www.hostip.info\/\">HostIP.info<\/a>&nbsp;(IPv4 only)<\/li><li>Free with registration:&nbsp;<a href=\"http:\/\/dev.maxmind.com\/geoip\/geoip2\/geolite2\/\">Maxmind GeoIP2 Lite City<\/a>, automatically updated weekly<\/li><li>Commercial:&nbsp;<a href=\"https:\/\/www.maxmind.com\/en\/geoip2-country-database\">Maxmind GeoIP2 City<\/a>&nbsp;or&nbsp;<a href=\"https:\/\/www.maxmind.com\/en\/geoip2-city\">Maxmind GeoIP2 Country<\/a><\/li><li>Commercial Web-API:&nbsp;<a href=\"https:\/\/www.maxmind.com\/en\/geoip2-precision-services\">Maxmind GeoIP2 Precision<\/a>&nbsp;(City, Country or Insights)<\/li><li>Hosting-Provider dependent:&nbsp;<a href=\"https:\/\/support.cloudflare.com\/hc\/en-us\/articles\/200168236-What-does-CloudFlare-IP-Geolocation-do-\">Cloudflare<\/a>&nbsp;or&nbsp;<a href=\"https:\/\/aws.amazon.com\/blogs\/aws\/enhanced-cloudfront-customization\/\">Amazon AWS CloudFront<\/a>&nbsp;(Country)<\/li><li>Free or Commercial Web-API:&nbsp;<a href=\"https:\/\/ipstack.com\/\">Ipstack<\/a><\/li><\/ul>\n\n\n\n<p>Lots of built in shortcode available to use in front end. It also has ready php hook to use in template file.<\/p>\n\n\n\n<p>Give that a try and comments below, if you need any help with this plugin.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are lots of plugins available on wordpress to show content based visitor country. Recently i worked on such a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[266,265,264],"class_list":["post-1084","post","type-post","status-publish","format-standard","hentry","category-plugins","tag-country-based-content","tag-ip-detection","tag-wordpress-geo-location"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to show content based on visitor country? - WordPress Support<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to show content based on visitor country? - WordPress Support\" \/>\n<meta property=\"og:description\" content=\"There are lots of plugins available on wordpress to show content based visitor country. Recently i worked on such a\" \/>\n<meta property=\"og:url\" content=\"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/\" \/>\n<meta property=\"og:site_name\" content=\"WordPress Support\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/getwpsupport\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-03-30T01:38:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-03-30T01:40:17+00:00\" \/>\n<meta name=\"author\" content=\"ShaplaKanon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ruhul24\" \/>\n<meta name=\"twitter:site\" content=\"@ruhul24\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ShaplaKanon\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/\"},\"author\":{\"name\":\"ShaplaKanon\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#\\\/schema\\\/person\\\/f5f224239283c27426dadc2e4cc9a825\"},\"headline\":\"How to show content based on visitor country?\",\"datePublished\":\"2020-03-30T01:38:54+00:00\",\"dateModified\":\"2020-03-30T01:40:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/\"},\"wordCount\":172,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#organization\"},\"keywords\":[\"country based content\",\"ip detection\",\"wordpress geo location\"],\"articleSection\":[\"plugins\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/\",\"url\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/\",\"name\":\"How to show content based on visitor country? - WordPress Support\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#website\"},\"datePublished\":\"2020-03-30T01:38:54+00:00\",\"dateModified\":\"2020-03-30T01:40:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/how-to-show-content-based-on-visitor-country\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to show content based on visitor country?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#website\",\"url\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/\",\"name\":\"WordPress Support\",\"description\":\"Wordpress Repair, migration, speed optimization\",\"publisher\":{\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#organization\",\"name\":\"WordPress Support\",\"url\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/05\\\/cropped-logo-9674824.png\",\"contentUrl\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/05\\\/cropped-logo-9674824.png\",\"width\":274,\"height\":55,\"caption\":\"WordPress Support\"},\"image\":{\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/facebook.com\\\/getwpsupport\\\/\",\"https:\\\/\\\/x.com\\\/ruhul24\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/#\\\/schema\\\/person\\\/f5f224239283c27426dadc2e4cc9a825\",\"name\":\"ShaplaKanon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef2c8f93a0558c2047555f674c8746b22988ace93eba9262d198d0a28236ce97?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef2c8f93a0558c2047555f674c8746b22988ace93eba9262d198d0a28236ce97?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ef2c8f93a0558c2047555f674c8746b22988ace93eba9262d198d0a28236ce97?s=96&d=mm&r=g\",\"caption\":\"ShaplaKanon\"},\"sameAs\":[\"https:\\\/\\\/shaplakanon.com\\\/wdc\\\/\"],\"url\":\"https:\\\/\\\/shaplakanon.com\\\/wpsupport\\\/author\\\/sabahat\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to show content based on visitor country? - WordPress Support","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/","og_locale":"en_US","og_type":"article","og_title":"How to show content based on visitor country? - WordPress Support","og_description":"There are lots of plugins available on wordpress to show content based visitor country. Recently i worked on such a","og_url":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/","og_site_name":"WordPress Support","article_publisher":"https:\/\/facebook.com\/getwpsupport\/","article_published_time":"2020-03-30T01:38:54+00:00","article_modified_time":"2020-03-30T01:40:17+00:00","author":"ShaplaKanon","twitter_card":"summary_large_image","twitter_creator":"@ruhul24","twitter_site":"@ruhul24","twitter_misc":{"Written by":"ShaplaKanon","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/#article","isPartOf":{"@id":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/"},"author":{"name":"ShaplaKanon","@id":"https:\/\/shaplakanon.com\/wpsupport\/#\/schema\/person\/f5f224239283c27426dadc2e4cc9a825"},"headline":"How to show content based on visitor country?","datePublished":"2020-03-30T01:38:54+00:00","dateModified":"2020-03-30T01:40:17+00:00","mainEntityOfPage":{"@id":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/"},"wordCount":172,"commentCount":0,"publisher":{"@id":"https:\/\/shaplakanon.com\/wpsupport\/#organization"},"keywords":["country based content","ip detection","wordpress geo location"],"articleSection":["plugins"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/","url":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/","name":"How to show content based on visitor country? - WordPress Support","isPartOf":{"@id":"https:\/\/shaplakanon.com\/wpsupport\/#website"},"datePublished":"2020-03-30T01:38:54+00:00","dateModified":"2020-03-30T01:40:17+00:00","breadcrumb":{"@id":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/shaplakanon.com\/wpsupport\/how-to-show-content-based-on-visitor-country\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/shaplakanon.com\/wpsupport\/"},{"@type":"ListItem","position":2,"name":"How to show content based on visitor country?"}]},{"@type":"WebSite","@id":"https:\/\/shaplakanon.com\/wpsupport\/#website","url":"https:\/\/shaplakanon.com\/wpsupport\/","name":"WordPress Support","description":"Wordpress Repair, migration, speed optimization","publisher":{"@id":"https:\/\/shaplakanon.com\/wpsupport\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/shaplakanon.com\/wpsupport\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/shaplakanon.com\/wpsupport\/#organization","name":"WordPress Support","url":"https:\/\/shaplakanon.com\/wpsupport\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/shaplakanon.com\/wpsupport\/#\/schema\/logo\/image\/","url":"https:\/\/shaplakanon.com\/wpsupport\/wp-content\/uploads\/sites\/2\/2022\/05\/cropped-logo-9674824.png","contentUrl":"https:\/\/shaplakanon.com\/wpsupport\/wp-content\/uploads\/sites\/2\/2022\/05\/cropped-logo-9674824.png","width":274,"height":55,"caption":"WordPress Support"},"image":{"@id":"https:\/\/shaplakanon.com\/wpsupport\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/facebook.com\/getwpsupport\/","https:\/\/x.com\/ruhul24"]},{"@type":"Person","@id":"https:\/\/shaplakanon.com\/wpsupport\/#\/schema\/person\/f5f224239283c27426dadc2e4cc9a825","name":"ShaplaKanon","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ef2c8f93a0558c2047555f674c8746b22988ace93eba9262d198d0a28236ce97?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ef2c8f93a0558c2047555f674c8746b22988ace93eba9262d198d0a28236ce97?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef2c8f93a0558c2047555f674c8746b22988ace93eba9262d198d0a28236ce97?s=96&d=mm&r=g","caption":"ShaplaKanon"},"sameAs":["https:\/\/shaplakanon.com\/wdc\/"],"url":"https:\/\/shaplakanon.com\/wpsupport\/author\/sabahat\/"}]}},"_links":{"self":[{"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/posts\/1084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/comments?post=1084"}],"version-history":[{"count":1,"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/posts\/1084\/revisions"}],"predecessor-version":[{"id":1085,"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/posts\/1084\/revisions\/1085"}],"wp:attachment":[{"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/media?parent=1084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/categories?post=1084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shaplakanon.com\/wpsupport\/wp-json\/wp\/v2\/tags?post=1084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}