Using location to tailor the content for a user

Today’s challenge:

How to read the IP address of  a vistor to alter the content that they see on my website.

I’m in the middle of creating a site that will give people ideas for things that they can do for other people. This is a “for social good” project. It could be something generic – clear out the cupboards – or it be specific to your area – things to do in your town or county.

This will mean that posts will have to be tagged with something geo like so that they can be searched. My first guess here, having never done it before is to use Geo my WP. This will allow my posts to have a location.

The next thing is then to use the users IP address to lock down their location. For this I’m giving WP GEOcode a go. Of course this isn’t perfect and so I guess I’ll need to find a way that users can say “I’m not based here” and either select a new location or be shown a default.


You may also like...

Leave a Reply

Your email address will not be published.