[Resolved] Theme seller – cls issue on the front page

Home Forums Support [Resolved] Theme seller – cls issue on the front page

Home Forums Support Theme seller – cls issue on the front page

  • This topic has 13 replies, 2 voices, and was last updated 1 week ago by David.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #1962998
    Jean

    Hello,

    I use theme seller
    The cls is always around 0,2 ont the main page for mobile.
    I’ve tried everything I know. It doesn’t work.
    Could you please give me any advice ?

    Thank you.
    Jean

    #1963104
    David
    Staff
    Customer Support

    Hi there,

    try adding the following PHP Snippet to your site:

    add_action( 'after_setup_theme', function() {
        remove_action( 'wp_head', 'generate_add_viewport' ); 
        add_action( 'wp_head', 'generate_add_viewport', 1 ); 
    } );

    This doc explains how to add PHP: https://docs.generatepress.com/article/adding-php/

    #1963108
    Jean

    Thank you David.
    the snippet has improved the cls but it is still above 0.1.
    Have you, plesae, any other solution ?
    Thnak you

    #1963168
    David
    Staff
    Customer Support

    Very odd – you images are loading with width and height attributes so the browser should reserve space for them… but its not. What method are you using to load WebP images on the site? I wonder if that is interfering.

    #1963191
    Jean

    Not sure my answer fits the question…
    I downloaded them in the media library. I don’t use any cdn.

    #1963196
    David
    Staff
    Customer Support

    Hmmm… this is very odd, theres no reason why those images shouldn’t load correctly.
    As a note though – not all browsers support webP – which means they won’t display on them.

    I wonder if the WP lazy loading feature is affecting them. You cant try adding this additional PHP Snippet to disable that:

    add_filter( 'wp_lazy_loading_enabled', '__return_false' );

    #1963232
    Jean

    Thank you David.
    There’s no significative improvment with the snippet.
    I’ll test with jpeg and come back.

    #1963235
    David
    Staff
    Customer Support
    #1963248
    Jean

    I tried jpeg images. It doesn’t change anything.

    #1963256
    David
    Staff
    Customer Support

    Can you try removing this CSS:

    .woocommerce ul.products li.product a img, .woocommerce div.product div.images img {
        padding: 3px;
        border: 1px solid rgba(0,0,0,0.1);
        box-sizing: border-box;
    }
    #1963447
    Jean

    Thank you David.
    The borders were the culprits
    It’s far better now.
    I very appreciate your help !
    Thank you very much.
    Have a nice day.

    #1963471
    David
    Staff
    Customer Support

    Sorry i should have spotted that before!

    Glad to be of help.

    #1963728
    Jean

    Don’t be sorry David !
    I found another thing that improves the cls. I preload the two first images of products
    Thank you for your help.

    #1964046
    David
    Staff
    Customer Support

    Thats great to hear ๐Ÿ™‚

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