Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #912408

    is that a new feature ?
    i want to write a little tutorial how to get two logos in the header – but in responsive case i see that social icons goes to main-nav
    i got three logos ( the normal one is at display none) but i got after each logo a nav class="main_menu"
    i can not remember that this is in former times the case.
    there should be only after .logo:first-child a .main-menu !

    see behavior here: https://webers-testseite.de/two-logo-header/

    i inserted the logos of that page via:

    function add_logos($logo) {
    	if(is_page(30811)){
    	$logo .= '<span class="logo first-logo"><a href="/">' ;
    	$logo .= '<img src="/wp-content/uploads/webers-webdesign-2.png"/>';
    	$logo .= '</a></span>';
    	$logo .= '<span class="logo second-logo"><a href="https://guenterweber.com" target="_blank">' ;
    	$logo .= '<img src="/wp-content/uploads/Guenni007.png"/>';
    	$logo .= '</a></span>';
    	}
    	return $logo;
    }
    add_filter('avf_logo_final_output', 'add_logos');	

    i can set them to display: none by:

    .first-logo + .main_menu, .second-logo + .main_menu {
        display: none !important;
    }

    but why are they created

    #913062

    Hey Guenter,

    Thank you for using Enfold.

    The menu has to be duplicated inside the main header area if it is set to display below the header. You can find the script in the js > avia.js file.

    (function normalize_layout()
    		{
    			//if we got the menu outside of the main menu container we need to add it to the container as well
    			if(menu_in_logo_container.length) return;
    
    			var menu2 = $('#header .main_menu').clone(true);
    				menu2.find('.menu-item:not(.menu-item-avia-special)').remove();
    				menu2.insertAfter(logo_container.find('.logo'));
    
    			//check if we got social icons and append it to the secondary menu	
    			var social = $('#header .social_bookmarks').clone(true);
    			if(!social.length) social = $('.av-logo-container .social_bookmarks').clone(true);
    
    			if( social.length )
    			{
    				menu2.find('.avia-menu').addClass('av_menu_icon_beside');
    				menu2.append(social);
    			}
    
    			//re select the burger menu if we added a new one
    			burger_wrap = $('.av-burger-menu-main a');
    		}());
    

    Best regards,
    Ismael

    #913271

    so if i want to have all the advantages of having class logo to second and third logo – i have to live with that – and set the additional burgers to display none

    I can live with that:

    .main_menu:not(:first-of-type) {
        display: none !important;
    }
    • This reply was modified 6 years, 9 months ago by Guenni007.
    #913652

    Hi,

    Please try to modify this line.

    menu2.insertAfter(logo_container.find('.logo'));

    Exclude the second or third logo if available.

    menu2.insertAfter(logo_container.find('.logo:not(".second-logo, .third-logo")'));
    

    I’m not sure if the :not selector is correct. If that is not working, try to use the .not jquery function.

    menu2.insertAfter(logo_container.find(&#039;.logo&#039;).not('.second-logo, .third-logo'));
    

    Best regards,
    Ismael

    #913698

    it is working !
    this is an elegant method – indeed – but i’m allways looking for child-theme solutions.

    by the way allthough it is on display:none it is the first logo so this might work too:

    menu2.insertAfter(logo_container.find('.logo:first'));

    maybe this will be something to have in avia.js on default, that only the first logo gets that.

    #914010

    Hi,

    We have forward that also to Gunter so he can take a look and consider into an update! :)

    Best regards,
    Basilis

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