The Condition tags option was built to allow you to select which page where will the pop-up appear. This feature is available on WooCommerce Notification, WooCommerce Multi Currency, WooCommerce Lucky Wheel, WordPress Lucky Wheel The option is based on WordPress Conditional Tags and WooCommerce Conditional tags.
In this guide, I will try to show you some simple & common Conditional tags.
To handle WP’s Conditional Tags, this plugin uses eval() which is very dangerous because it allows the execution of arbitrary PHP code. Therefore, please only fill this field with proper conditional tags which are validated and/or provided by trusted developers.
Displaying on Homepage
On some websites, the front page is not the home page, so you may try both 2 codes above. To not display on the homepage, please add an exclamation mark before the code
Displaying on WooCommerce pages.
WooCommerce pages include single product pages, the Shop page, and categories. But not the Cart page and Checkout page, cart and checkout are standard pages. To display pop-ups on WooCommerce.
Displaying on Cart & Check out pages.
Displaying on specific pages.
To display on some specific pages, you need the ID of that pages.
When Post 17 is being displayed as a single Post.
is_page( '17' )
Returns true when the single post being displayed is either post ID = 17, post ID = 19, post ID = 1 or post ID = 11.
is_page( array( 17, 19, 1, 11 ) )
To get the ID of a page, you need to go to the edit page of that page. The ID will appear in the URL of the page.
Some common conditional tags.
These are some common conditional tags we often give to the web owner
is_home() | is_front_page() | is_woocommerce()
Displaying on homepage and WooCommerce pages.
is_woocommerce() | is_cart()
Displaying on Woocommerce pages and Cart page.
is_woocommerce() | is_cart() | is_check_out()
Displaying on WooCommerce pages, Cart page, and Checkout page