[Resolved] mobile hamburger on the next row

Home Forums Support [Resolved] mobile hamburger on the next row

Home Forums Support mobile hamburger on the next row

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

    Hi,

    I read a couple of the forum responses but can’t seem to fix the mobile hamburger issue for my website.

    also when the mobile moves from landscape to portrait (or vice-versa) the hamburger gets misaligned.

    Could you please advise?

    Many thanks
    Kumar

    #1452274
    David
    Staff
    Customer Support

    Hi there,

    your logo is being lazy loaded – and the placeholder is larger then required, which is causing the issue.

    Most lazy loaders have an option to exclude images by filename of CSS class.
    As you’re using 3.0 you can exclude this CSS Class: is-logo-image

    #1452460
    Kumar

    Thanks for the prompt reply, David.

    I am using WP rocket for lazyload
    https://docs.wp-rocket.me/article/15-disabling-lazy-load-on-specific-images

    function rocket_lazyload_exclude_class( $is-logo-image) {
    $attributes[] = ‘class=”divi-slider”‘;

    return $attributes;
    }
    add_filter( ‘rocket_lazyload_excluded_attributes’, ‘rocket_lazyload_exclude_class’ );

    Do I need to change ‘class=”is-logo-image” too? Where do I add this – CSS or code snippet plugin?

    Thanks
    Kumar

    #1452498
    Leo
    Staff
    Customer Support

    Try this:

    function rocket_lazyload_exclude_class( $attributes ) {
    	$attributes[] = 'class="is-logo-image"';
    
    	return $attributes;
    }
    add_filter( 'rocket_lazyload_excluded_attributes', 'rocket_lazyload_exclude_class' );

    with one of these methods:
    Adding PHP: https://docs.generatepress.com/article/adding-php/

    #1479999
    Kumar

    Thanks Leo.

    #1480702
    Leo
    Staff
    Customer Support

    No problem 🙂

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