• Hi,

    I am adding in a custom class to be ignored, but the images are still being processed on a product listing page within woocommerce.

    When I disabled the images within an archive it does work.

    I think that the class setting should take priority, in temrs of being ignored, is that correct?

    Can you confirm it is working as expected?

    Thanks

    Woocomerce 3.4.3
    WordPress 4.9.8

    • This topic was modified 6 years, 3 months ago by nebrekab.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, it looks like it’s not working, not always at least.

    I’m doing this in a widget output code to inject the a3-notlazy class and it’s not working:

    $htmlimg = get_the_post_thumbnail(get_the_ID(), 'my-theme-slider');
    echo str_replace('class="', 'class="a3-notlazy ', $htmlimg);

    The resulting image has these classes in the final html of the page but I think it gets lazied anyway:

    class="a3-notlazy lazy lazy-hidden attachment-my-theme-slider size-my-theme-slider wp-post-image"

    • This reply was modified 6 years, 2 months ago by DrLightman.
    • This reply was modified 6 years, 2 months ago by DrLightman.
    • This reply was modified 6 years, 2 months ago by DrLightman.
    • This reply was modified 6 years, 2 months ago by DrLightman.

    ok maybe because filters have already run

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ignore classes not working’ is closed to new replies.