ShowIf live examples

Every box below is the same page for every visitor. ShowIf decides on the server which version you get. Use the button in the corner to switch between a guest and a logged-in member, add ?vip=1 to the address, reload the page, or add something to the cart.

1. Logged in or not

[showif loggedin="true"] Member price: $24 [/showif] [showif_else] Log in to see the member price [/showif_else]
Log in to see the member price.

2. User role, and “not” with !

[showif role="administrator"] Shown to administrators [/showif] [showif role="!administrator"] Shown to everyone else [/showif]
You are not an administrator (role=”!administrator”).

3. Link parameter

[showif url_param="vip=1"] Welcome, VIP guest [/showif]
No ?vip=1 in the link, so no VIP welcome.

4. Device

[showif device="mobile"] ... [/showif] [showif device="desktop"] ... [/showif]
You are on a desktop computer.

5. Time of day (store time)

[showif time="09:00-17:00"] Live chat is open [/showif]
Live chat is closed. Back at 09:00 store time.

6. Day of the week

[showif day="saturday,sunday"] Weekend deal: 15% off [/showif]
It is a weekday (store time). The weekend deal comes back on Saturday.

7. Date range

[showif date="2026-11-20:2026-12-31"] Holiday shipping info [/showif]
Holiday season (20 Nov – 31 Dec): order by 18 Dec for delivery before Christmas.

8. Returning visitor

[showif visits=">=3"] Welcome back [/showif]
Fewer than 3 page loads so far. Reload this page twice and this box changes.

9. Cart total (WooCommerce)

[showif woo_cart=">=50"] Free shipping unlocked [/showif]
Add $50 to your cart to unlock free shipping.

10. A saved rule

[showif rule="vip-access"] ... [/showif] (rule built in ShowIf → Rules)
The saved rule “VIP URL Parameter” did not match. Add ?vip=1 to the address.

11. Two conditions at once (AND)

[showif loggedin="true" device="desktop"] ... [/showif]
Needs both: logged in and on a desktop.

12. CSS class, no shortcode

class="showif--loggedin-true"
Guests never see this box: it carries a ShowIf class instead of a shortcode, and the server removes it from their page.

13. A typo never shows content to everyone

[showif devise="mobile"] ... [/showif] ("devise" is not a condition)
ShowIf hides content it cannot evaluate. Administrators see a note saying why; visitors see nothing.

14. Scroll depth

[showif scroll="60"] Thanks for reading this far [/showif]
You scrolled past 60% of the page, so this box appeared.
The box above appears once you scroll past 60% of the page.