Site logo

Archived topic

mobile hamburger on the next row

5 replies · Started by Kumar on September 21, 2020

Viewing posts 1–6 of 6

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

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

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

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/

Thanks Leo.

No problem :)

This archived topic is closed to new replies.