Download

You can download this extension directly off our website at – https://www.lsdev.biz/product/lsx-geo-content/

You can also download and install the extension directly from the backend of your website:

  • Login to the backend of your website
  • Hover over the “Appearance” menu item and select the “LSX” sub-menu item
  • You will notice a list of the current LSX extensions under the “Enhance LSX”
  • Select the extension labelled “LSX Geo Location”
  • You will be redirected to our website where you can purchase and download the extension

Install

Navigate to the back-end of your wordpress website

Hover over the “Plugins” item on your Dashboard

Select the “Add New” sub item

Select the “Upload Plugin” option and choose the “LSX Geo Location” extension file you recently downloaded

Select “Install Now”

Once the plugin is installed, select “Activate Plugin”

Settings

API License Activation

Activate your extension by inserting the license key you received when completing purchase of the extension.

  • Navigate to your WordPress Dashboard
  • Hover over the ‘Appearance” menu item
  • Select the “Theme Options” sub-menu item
  • You will then land in the “Display” tab
  • Navigate to the tab labelled “API”
  • Select the “License Keys” sub-item
  • You will notice a field heading “LSX Geo Location”
  • FIll your valid registration email and API key into the provided fields
  • Select “Activate”

How the extension works

The extension detects your IP address and the Protocol Version (v4 or v6) used.

Your country code  is then determined using the downloaded DB from https://dev.maxmind.com. This is cached for 1 hour.

Filtering content by Shortcode

You can use any of the following inside a WordPress editor, or a shortcode enabled field.

[geo_content country=”ZA”] You are in South Africa [/geo_content]

[geo_content country=”US”] You are in the US [/geo_content]

 

Filtering Template Tags by location

Replace country code with the 2 digit country code.

  • United States = US
  • United Kingdom = GB
  • South Africa = ZA

<?php
   if ( lsx_geo_is_country( $country_code ) ) {
       // Do code
   }
?>


Pre-populated form fields with Caldera Forms

Add in one of the following custom CSS classes to the field you wish to pre-populate. The filters only work with the “text” and “dropdown” type classes.

  • .lsx-geo-ip
  • .lsx-geo-country

Display location-specific Nav Menu items

Firstly create a menu and assign it to a menu location. You will add a custom link to the menu and several child menu items, so it creates a drop down on the frontend.

  • .lsx-geo
  • .lsx-geo-parent
  • .lsx-geo-default
  • .lsx-geo-{country_code} e.g “lsx-geo-za”
  • .lsx-geo-ex-{country_code} e.g “lsx-geo-ex-us”