Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1204583

    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?

    #1205696

    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

    #1205753

    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

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.