![]() Syntax to hide the content from specific countryĪll visitors will be able to see the line except visitors from Vietnam.Īll visitors will be able to see this line except visitors from Vietnam. ![]() ![]() Only visitors from California or New York can view this line. To show the content for California or New York visitors only. Note: XX is a two-character ISO-3166 country code and YY is a ISO-3166-2 sub-division code. Syntax to show content for specific country and region Only visitors from United States or Canada can view this line. To show the content for United States or Canada visitors only. Note: XX is a two-character ISO-3166 country code. Syntax to show content for specific country You are in Geo-targeting: Customize the post content with IP2Location Tag Get visitor’s location information with Variable Tagĭisplay visitor’s IP address, country name, region name and city name. If you are using the IP2Location IP geolocation web service, please visit IP2Location Web Service for details. Alternatively, you can also manually download and update the BIN data file using the below links:īIN file download: IP2Location Commercial database | IP2Location LITE database (free edition) If you are using the BIN data, you can update the BIN data every month by using the wizard on the settings page for the most accurate result. This plugin supports both IP2Location IP geolocation BIN data and web service for IP geolocation lookup. Customize the page content based on country or region.Displays visitor’s’ information such as.This plugin provides a relatively easy way to detect visitors’ IP addresses and translate it into geolocation information, and then keep visitors better engaged with localized information or content that’s most relevant to them. Remember to make sure that the class IP2LocationTags exists first and use global keyword.IP2Location Tags helps you to serve specific content to website visitors based on geographic location for different countries and regions via IP address lookup. To use the plugin in theme, just use the global variable $ip2location_tags. $ip2location_tags = new IP2LocationTags() In main file of IP2Location plugin, the class instance is created and assigned to the variable. I'm assuming you're using "IP2Location Tag Wordpress Plugin". 17:40:31 Geolocation result for found: Array 17:39:53 Geolocation result for found: ArrayĬell Phone LTE Data Connection: (This Dosen't work ) 17:40:04 Lookup by BIN database. Wifi / ethernet Connection: (This works great) 17:39:53 Lookup by BIN database. Thank you for your advise I found quite a bit of bugs on other plugins so I decided to fix them to see if it would make ip2location work but it didn't. I am not a full time coder any example on how to may be try will be very helpful. This is how ip2location says to use there service in PHP This is how the header php looks like in the template ![]() Is this possible and if so how do I go about this? This is easy you install the plugin and then just use in the post or page editor.īut I want to print this information in my template header file right beside the title I am using Ip2location plugin to pull state data based on Ip address into my post.
0 Comments
Leave a Reply. |