This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Remove all of the Beaver Builder child theme presets | |
//(does not remove default as you should overwrite default with your child theme's default settings) | |
function es_remove_presets() | |
{ | |
FLCustomizer::remove_preset( 'default-dark' ); | |
FLCustomizer::remove_preset( 'classic' ); | |
FLCustomizer::remove_preset( 'modern' ); | |
FLCustomizer::remove_preset( 'bold' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Conditionally change menus | |
add_filter( 'wp_nav_menu_args', 'bb_wp_nav_menu_args' ); | |
function bb_wp_nav_menu_args( $args = '' ) { | |
// change the menu in the Header menu position | |
if( $args['theme_location'] == 'header' && is_page('1159') ) { | |
$args['menu'] = '32'; // 32 is the ID of the menu we want to use here | |
} | |
return $args; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/*** | |
* Automatically set GeneratePress to full width layout when Beaver Builder active on page | |
***/ | |
function jo_custom_body_class( $classes ) { | |
if ( class_exists( 'FLBuilderModel' ) && FLBuilderModel::is_builder_enabled() ) { | |
$classes[] = 'full-width-content'; |