i sometimes use the avf_header_setting_filter to set for specific pages a different header-layout.
f.e:
add_filter('avf_header_setting_filter','av_change_header_layout');
function av_change_header_layout($header){
if(is_page(3)){
$header['header_layout'] = "logo_center bottom_nav_header menu_right";
$header['bottom_menu'] = "header_bottom_menu_active";
}
return $header;
}
if i have on general set the display as icon option and i want to change that only on one page
is there a filter option or do i have to make this via quick css with changing the display options there?
Hey Guenter,
Thank you for the inquiry.
You should be able to use the avf_burger_menu_active filter found in the header.php file to toggle the desktop menu style.
/**
* Allows to alter default settings Enfold-> Main Menu -> General -> Menu Items for Desktop
* @since 4.4.2
*/
$is_burger_menu = apply_filters( 'avf_burger_menu_active', avia_is_burger_menu(), 'header' );
$av_classes_manually .= $is_burger_menu ? " html_burger_menu_active" : " html_text_menu_active";
Best regards,
Ismael
yes – so i use it this way:
function custom_burger_menu_active( $active, $context ){
if( is_page(3) ) {
return true;
}
return $active;
}
add_filter('avf_burger_menu_active', 'custom_burger_menu_active', 10, 2 );
can be closed