How to personalize your website using Geolocation for dynamic image replacement.
Part 1
Logic Hop variable display and conditional shortcodes make it easy to add geolocation personalization to your WordPress site with just a few clicks.
Need to test your Geolocation? Try GeoScreenshot.com
Part 2
Logic Hop Javascript conditions and variable display provide AJAX-based solutions that enable personalization even when caching is enabled.
Tutorial Javascript Code – Variable Image:
<img style="display: none;" class="logichop-js" data-type="source" data-var="Location.RegionCode" data-src="/wp-content/uploads/2017/04/header_#VAR#.png" data-event="fadein">
Tutorial Javascript Code – Conditional Statements with Images:
<div class="logichop-js" data-cid="117" style="display: none;" data-event="fadein"> <img style="display: none;" class="logichop-js" data-type="source" data-var="Location.RegionCode" data-src="/wp-content/uploads/2017/04/header_#VAR#.png" data-event="fadein"> </div> <div class="logichop-js" data-cid="117" style="display: none;" data-event="show" data-not="true"> <img src="/wp-content/uploads/2017/04/header_default.png"> </div>
Not sure if content personalization is right for you?