The PHP Condition

The PHP Condition is available in Pro
Unlock this and dozens of other powerful features by upgrading to FireBox Pro.
Unlock this feature

The PHP Condition lets you write your own PHP code and return a true or false to display or hide the popup from the current page.

You can find a collection of ready-to-use PHP scripts here.

Notes

When trying to compare against the current post/page, you should use the following snippet:

global $post;
wp_reset_postdata();
// Use $post to run your checks against the current post/page
return $post->post_type === 'post';

The reason is that when using just global $post, or get_post(), it will always return the FireBox post instance and not the parent.

Use Case

This rule is rather useful if you want to display a popup on scenarios such as if the user has a total of X on their cart and you want to provide an upsell or coupon or anything of that nature. This gives you the flexibility to display a popup under almost any circumstance.

The PHP Condition is available in Pro
Unlock this and dozens of other powerful features by upgrading to FireBox Pro.
Unlock this feature
Was this helpful?
In this article