Update: I installed Maxmind GeoIP Lite City as the data source and that works fine. Thanks again for your help and for such a great plugin.
Many thanks indeed for your speedy response, Robin.
Yes, the Geolocation IP Detection plugin is definitely installed and enabled. I tested it as you suggested and the response came back NULL.
On my other site, which is configured in exactly the same way, it’s working fine!
I’ve tried deleting and reinstalling it, but that didn’t make any difference. I’ll keep fiddling and see if I can trick it into working.
Thanks again for your help.
Thank you, sergislevas, your code was exactly what I wanted. That’s the best solution I’ve found for a dynamic menu.