I just made a landing page in wordpress and now I want to add some code that will display the vistors city name. How would I go about doing this? I've tried plugins but a lot of them are outdated.
Have you tried using a wordpress plugin called GeoIP Detection? It uses the maxmind IP database to detect the user IP location and then echo the City or Country or other details to the screen where you require it to. If this plugin doesn't work it might be that the database of IPs is old however it seems to have been updated only 2 months ago.
If you still are having issues you might want to download the maxmind database manually onto your server and then also include a php file with function that can be used to echo the details you want to your website. If you need assistance let me know and I will try to help you here.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.