Interactive WPLocation demo
See country rules make a decision.
Check the country detected for your current visit, then preview the same examples as a visitor from the United States or United Kingdom.
Checking your detected country…
Preview buttons simulate a country for the examples below. They do not change your IP address or the country detected on other pages.
Available in Free
Try every Free rule type
Each result below is calculated by the same Free rule function that evaluates WordPress content. The examples are isolated and do not save a rule to this site.
UK-only page
Include a whole page for visitors whose detected country is the UK.
Page: include GBUSA-only post
Include one post for visitors detected in the United States.
Post: include USPost category rule
Exclude an entire post category for USA visitors.
Category: exclude USPost plus category
A post is shown only when its own rule and its category rule both allow it.
Post: include US, GB · Category: exclude USShortcode section
Show one part of a page to UK visitors while keeping the rest of the page visible.
[locationtarget country="GB"]Country visibility block
Display a Gutenberg block only when a USA inclusion rule allows it.
Block: include USCountry display shortcode
Show the detected or previewed country name and ISO code in page content.
Checking…Blocked-content fallback
When the sample UK-only page is hidden, a site can offer a useful explanation and a way back.
Checking…Pro rule preview
Explore product targeting
These examples call the installed Pro rule evaluator. They preview decisions for sample rules; this marketing site does not run WooCommerce, so they do not demonstrate actual catalog, cart, or checkout behavior.
USA-only product
A product audience includes visitors from the United States.
Product: include USProduct category outside UK
A product-category audience excludes visitors from the UK.
Product category: exclude GBBehind the result
What is actually being tested?
Country lookup
For the live UK check, WordPress estimates your country from the network IP address it receives using its configured local country database. The demo does not display or save your IP.
Rule evaluation
The Free and Pro plugin functions compare a country code with each example’s include or exclude list. A combined post and category example must pass both rules.
Visible result
“Shown” means the sample rule allows that country. “Hidden” means it does not. An unknown country does not pass a restricted rule. Preview mode changes only the sample country in this demo.
How accurate is it? IP geolocation is an estimate of a network location, not proof of residence. VPNs, proxies, mobile networks, and stale data can affect it. For real traffic, configure caching and trusted proxy handling so each visitor receives the right response.
