Title: Using in search.php
Last modified: August 30, 2016

---

# Using in search.php

 *  Resolved [MickWP](https://wordpress.org/support/users/mickwp/)
 * (@mickwp)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/)
 * Hi,
 * I’m trying to use this plugin dynamically for content shown in my search.php 
   file, but it isn’t working.
 * How can I get it to lazy load images shown in my search results (search.php)?
 * Thank you.
 * [https://wordpress.org/plugins/a3-lazy-load/](https://wordpress.org/plugins/a3-lazy-load/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Contributor [Nguyen Tuan](https://wordpress.org/support/users/nguyencongtuan/)
 * (@nguyencongtuan)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205241)
 * Hi MickWP
 * Can you tell me that the results content show in search.php are from plugins 
   or custom code of theme ?
 * So that if it’s custom function of theme or plugin without use get thumbnail 
   function of WP as:
    – [get_the_post_thumbnail](http://codex.wordpress.org/Function_Reference/get_the_post_thumbnail)–
   [wp_get_attachment_image](http://codex.wordpress.org/Function_Reference/wp_get_attachment_image)
 * Regards,
    Nguyen
 *  Thread Starter [MickWP](https://wordpress.org/support/users/mickwp/)
 * (@mickwp)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205244)
 * Hi Nguyen,
 * It’s from custom code added to search.php file.
 * There is no use of
 * – get_the_post_thumbnail
    – wp_get_attachment_image
 * That I know of, although the images are created via a shortcode to a plugin in
   search.php using do_shortcode.
 * Hope this helps.
 *  Plugin Contributor [Nguyen Tuan](https://wordpress.org/support/users/nguyencongtuan/)
 * (@nguyencongtuan)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205245)
 * **Hi MickWP**
 * Thanks for letting me know about that information, and i can answer that it does
   not work for shortcode from search.php file, a3 Lazy Load don’t support shortcode
   from themes or plugins like what i said on this topic [Working with video shortcodes](https://wordpress.org/support/topic/working-with-video-shortcodes?replies=4#post-7042150)
 * If you can edit the code of search.php, you should make like what i suggested,
   find where have this
 * > `do_shortcode( ... );`
 * and change to
 * > `apply_filters( 'a3_lazy_load_html', do_shortcode( ... );`
 * Hope that it can solve for your search.php file
 * Regards,
    Nguyen
 *  Thread Starter [MickWP](https://wordpress.org/support/users/mickwp/)
 * (@mickwp)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205248)
 * Hi Nguyen,
 * That worked great.
 * Thank you.
 *  Plugin Contributor [Nguyen Tuan](https://wordpress.org/support/users/nguyencongtuan/)
 * (@nguyencongtuan)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205249)
 * Hi MickWP
 * I’m happy that it solves for issue you are getting
 * Hope that you have best review for this plugin so that we have motivation to 
   make best features on future
 * Regards,
    Nguyen
 *  Thread Starter [MickWP](https://wordpress.org/support/users/mickwp/)
 * (@mickwp)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205255)
 * Hi Nguyen,
 * I will leave a good review now – it looks like it is working just as I wanted.
 * Just before I do, what is the difference between the script you have based this
   plugin on:
 * [https://github.com/ressio/lazy-load-xt](https://github.com/ressio/lazy-load-xt)
 * and the script here:
 * [https://github.com/aFarkas/lazysizes](https://github.com/aFarkas/lazysizes)
 * Is there any difference?
 * Thank you.
 *  Plugin Contributor [Nguyen Tuan](https://wordpress.org/support/users/nguyencongtuan/)
 * (@nguyencongtuan)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205288)
 * **Hi MickWP**
 * They are different script libs, I not ever use [lazysizes](https://github.com/aFarkas/lazysizes)
   so I don’t know what is different between them.
 * Have many lazy script libs, but **Lazy Load XT** has many control, options and
   addon support for extend our plugin.
 * Regards,
    Nguyen

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Using in search.php’ is closed to new replies.

 * ![](https://ps.w.org/a3-lazy-load/assets/icon.svg?rev=1049979)
 * [a3 Lazy Load](https://wordpress.org/plugins/a3-lazy-load/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/a3-lazy-load/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/a3-lazy-load/)
 * [Active Topics](https://wordpress.org/support/plugin/a3-lazy-load/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/a3-lazy-load/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/a3-lazy-load/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [Nguyen Tuan](https://wordpress.org/support/users/nguyencongtuan/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/using-in-searchphp/#post-6205288)
 * Status: resolved