WPLocation Shortcodes

WPLocation Shortcodes2018-10-23T05:35:48+00:00

This documentation helps you in using shortcodes that WPLocation plugin provides on your website.

Using Shortcodes

You can use these shortcodes to show some specific content to specific country visitors or you can use shortcodes to hide content for specific country visitors. You can use shortcodes within posts/pages (i.e. in editor) to show the desired content based on the visitor’s country.

For example: If you want to show some content just to US and GB visitors use this shortcode [locationtarget country=”US, GB”] This content is for US and GB visitors [/locationtarget]. This shortcode will show “This content is for US and GB visitors” to US and GB visitors and nothing will be displayed to other country visitors.

And similarly If you want that some content should not be displayed to specific country visitors you can use this shortcode [locationtarget exclude_country=”US”]This is visible to everyone except US[/locationtarget]. It will show “This is visible to everyone except US” to every country visitor except US.