Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Patrick Sletvold

    (@16patsle)

    Hi @snippet24,

    I tested the plugin, and it seems to work fine for me. Are you showing the plugin’s shortcode in the content of a post/page, or is it somewhere else, like through a page builder or similar? My guess would be that the lazysizes plugin may not be able to process that specific area by default. If the content is in a widget, make sure to enable the lazy load widget setting.

    Best regards,
    Patrick Sletvold

    Thread Starter snippet24

    (@snippet24)

    I’m using the shortcode with php in the template…

    <div class="col-md-12 carousel-padding">
    <?php echo do_shortcode("[twabc-carousel ]"); ?>
    </div>
    Plugin Author Patrick Sletvold

    (@16patsle)

    That would be it then. The way to solve it would be to wrap the html being displayed in a call to get_lazysizes_html, which lets this plugin process the html. Something like this:

    
    <div class="col-md-12 carousel-padding">
    <?php echo get_lazysizes_html(do_shortcode("[twabc-carousel ]")); ?>
    </div>
    

    Best regards,
    Patrick Sletvold

    Thread Starter snippet24

    (@snippet24)

    That works great!! thank you so much!!! ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Lazyload for featured image in custom post type’ is closed to new replies.