Home Forums WoodMart support forum Logo not lazy loading and menu in header not correct

Logo not lazy loading and menu in header not correct

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

    StefanNL
    Participant

    So I have enabled lazy loading in the plugin, but unfortunatly the logo in the header is also lazy loaded and that is something I want to disable. There was no option in the header builder for this, so I made a snippet with the following html code:


    <img src=”
    https://www.mydomain.com/wp-content/uploads/2022/08/Pirulen.svg&#8221; width=”220″ height=”33″ alt=”Logo”

    And than I loaded the snippet with the html/text block in the header builder. Now I have a logo that is not lazyloaded, but now I have problems with the flexible header row and colums (see picture). That is for both mobile and desktop version.

    Maybe I made it more difficult that I wanted, but my end result should be that the logo in the header is not lazy loaded and that the menu colum is nicely centered in the header (both mobile and desktop).

    Hopefully you can help me out 🙂

    Attachments:
    You must be logged in to view attached files.
    #447308

    Artem Temos
    Keymaster

    Hello,

    The lazy loading option in our theme doesn’t work for the logo image in the header. Please, add the logo element in the header builder so we can see if it is still active there.

    Kind Regards

    #447322

    StefanNL
    Participant

    The logo image is now in the header. It says loading = lazy when you inspect the logo. For your information, I enabled ‘lazy loading’ in the theme settings and use an offset of 150px.

    #447325

    Artem Temos
    Keymaster

    This attribute is a default WordPress lazyloading which works natively in the browser. It doesn’t depend on the theme’s lazy loading option and you can’t disable it for the logo. If you want, we can give you a code to disable it globally.

    Kind Regards

    #447327

    StefanNL
    Participant

    That code is than only for this specific attribute and not for disabling all lazy loading on the website. That would be great 🙂

    #447328

    Artem Temos
    Keymaster

    To disable the native lazy loading feature in WordPress, you can add the following code snippet to your child theme’s functions.php file or a custom plugin:

    add_filter( 'wp_lazy_loading_enabled', '__return_false' );

Viewing 6 posts - 1 through 6 (of 6 total)