Support » Plugin: a3 Lazy Load » Skip page for lazy load

  • Hi,

    I am trying to make work the code provided by the plugin owner which I have found on this support page

    I have added this into my functions file:

    add_filter( 'a3_lazy_load_run_filter', 'skip_a3_lazy_load_for_this_page', 11 );
    function skip_a3_lazy_load_for_this_page( $apply_lazyload ) {
    $apply_lazyload = false;
    return $apply_lazyload;
    }

    Then placed this into the page template before content:
    <?php apply_filters( 'a3_lazy_load_run_filter', 'skip_a3_lazy_load_for_this_page' );?>

    The problem is that the lazy load is still there. Any idea what am I doing wrong?

    • This topic was modified 8 months, 1 week ago by  maximmmus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Nguyen Tuan

    (@nguyencongtuan)

    Hi maximmmus,

    You put the code in wrong file

    You just should put below code into page template before content ( not on functions.php )

    add_filter( 'a3_lazy_load_run_filter', 'skip_a3_lazy_load_for_this_page', 11 );
    function skip_a3_lazy_load_for_this_page( $apply_lazyload ) {
    $apply_lazyload = false;
    return $apply_lazyload;
    }

    Don’t use this code anywhere
    <?php apply_filters( 'a3_lazy_load_run_filter', 'skip_a3_lazy_load_for_this_page' );?>

    Hi Nguyen,

    Thanks for your reply!

    I have placed the code in the page template. I have tried to place the code between php tags before and after page template name, but in both cases the lazyload is still loading on that page template. (checked with GTMetrix)
    https://snag.gy/aq3EPg.jpg
    https://snag.gy/mUQ36G.jpg

    What am I doing wrong?

    Thanks.

    • This reply was modified 3 months, 4 weeks ago by  maximmmus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.