Support » Plugin: Related Posts Thumbnails Plugin for WordPress » How can I filter plugin output?

  • Resolved jacky_K


    Hey. I need to add the attribute data-bgset = “” for lazy loading. How can I filter plugin output? For example add_filter (‘get_related_posts_thumbnails’ …… ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Asad Shahbaz



    Thank you for using our Related Posts Thumbnails. There isn’t any filter to support your current scenario.
    Can you please let me know where would you like to add data-bgset attribute.

    We will provide the filter in the next update.

    Cheers ✌

    For lazyLoad I need this code:
    <div class="relpost-block-single-image" alt="Chevrolet Aveo" style=" background: transparent url( no-repeat scroll 0% 0%; width: 150px; height: 150px; "></div>
    replace with one with parameter data-bgset
    <div class="relpost-block-single-image" alt="Chevrolet Aveo" data-bgset=""></div>
    I wanted to use the function in my snippet
    preg_match('/background-image\s*:\s*(?<attr>\s*url\s*\((?<url>[^)]+)\))\s*;?/is', $input_line, $url);

    Plugin Support Asad Shahbaz


    We have just added a new filter for this purpose and it will be available in the next update soon.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I filter plugin output?’ is closed to new replies.