Skip to content

Instantly share code, notes, and snippets.

@thierrypigot
Created December 1, 2021 09:32
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Check if a page is using a Beaver Builder layout
<?php
function is_beaver_builder_layout() {
if( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_enabled() ) {
return true;
} else {
return false;
}
}
// Use this inside your template files (page.php, single.php ...) to check
if( is_beaver_builder_layout() ) {
// Ok, this page use is a Beaver Builder layout
} else {
// Ko
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment