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.
The plugin is named Geolocation IP Detection. You can download and use it free from wordpress plugin directory. This plugin has lots of data sources integration option.
You can use one of these data sources (see comparison):
- Free (default source): HostIP.info (IPv4 only)
- Free with registration: Maxmind GeoIP2 Lite City, automatically updated weekly
- Commercial: Maxmind GeoIP2 City or Maxmind GeoIP2 Country
- Commercial Web-API: Maxmind GeoIP2 Precision (City, Country or Insights)
- Hosting-Provider dependent: Cloudflare or Amazon AWS CloudFront (Country)
- Free or Commercial Web-API: Ipstack
Lots of built in shortcode available to use in front end. It also has ready php hook to use in template file.
Give that a try and comments below, if you need any help with this plugin.