Here’s the PHP conditional you need to check if the Bricks Builder editor is Active and in editing mode.

The PHP Code: bricks_is_builder()

The PHP conditional you’re looking for to check if the Bricks editor is active is…

bricks_is_builder();
Code language: PHP (php)

TIPS! Important things about this function

Here are the main points I’ve come up with that I think you should know about this Bricks Builder PHP check to see if the builder is active and in the Bricks editing mode…

Use this instead of !is_admin()

The reason I started looking for this function was because I was adding the tracking code for the Popup software I use called ConvertBox.

ConvertBox

I tried A LOT of popup WordPress plugins and Sass and ConvertBox was the best choice. Available as a lifetime deal and now owned by the same team as the highly-successful ThriveCart. It’s an all-in-one popup software that just works (and works extremely well!).

Get ConvertBox

EXAMPLE: Using this PHP conditional to add custom JS

On my live website wagepirate.com, I use ConvertBox for all my Popup forms.

For some reason, when I loaded in my JS tracking code for ConvertBox, it broke the Bricks editor and I had errors in the JS console.