WordPress.org

Forums

Widget Logic
GEO targeting a widget (2 posts)

  1. Maukra
    Member
    Posted 1 year ago #

    For a website that uses subdomains in combination with WPML, I am looking for a solution to Geo target a right menu item based on the visitors IP.

    I know that I can use shortcodes to show a particular widget only on a particular subdomain, but I was wondering if there is any way to use Widget Logic to use the visitor's IP to determine which widget is shown.

    Any help is appreciated.

    http://wordpress.org/plugins/widget-logic/

  2. alanft
    Member
    Plugin Author

    Posted 1 year ago #

    http://uk1.php.net/en/reserved.variables.server.php

    $_SERVER['REMOTE_ADDR'] gives you the IP address of the client, so you can draw up some logic using that

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic