Title: Attachment search issues
Last modified: August 21, 2016

---

# Attachment search issues

 *  Resolved [fallenartist](https://wordpress.org/support/users/fallenartist/)
 * (@fallenartist)
 * [13 years ago](https://wordpress.org/support/topic/attachment-search-issues/)
 * When searching, the plugin correctly finds attachments (images) by name but doesn’t
   display their thumbnails, which is odd.
 * Also, when a name is entered into the search field, image attachments are correctly
   displayed in the list BUT after clicking “more results” button the results page
   is empty (“Nothing found”).
 * Finally, after deleting a term in the field the hovering window with results 
   doesn’t disappear.
 * I’m using basic version.
 * [http://wordpress.org/extend/plugins/search-in-place/](http://wordpress.org/extend/plugins/search-in-place/)

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

 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [13 years ago](https://wordpress.org/support/topic/attachment-search-issues/#post-3737307)
 * Hi,
 * Could you send me the link to your website for checking the issue, please?
 * If you prefer send me the contact through the support page in our website for
   give you a personalized support.
 * [http://wordpress.dwbooster.com/support](http://wordpress.dwbooster.com/support)
 *  Thread Starter [fallenartist](https://wordpress.org/support/users/fallenartist/)
 * (@fallenartist)
 * [13 years ago](https://wordpress.org/support/topic/attachment-search-issues/#post-3737503)
 * Hi,
    The site is behind maintenance mode redirect at the moment. I sent you an
   email via the support page. Thanks.
 *  Thread Starter [fallenartist](https://wordpress.org/support/users/fallenartist/)
 * (@fallenartist)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/attachment-search-issues/#post-3737670)
 * Hello again,
 * Is there a way to search through both attachment names AND captions?
 * Thanks.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/attachment-search-issues/#post-3737672)
 * Hi,
 * In the current version of plugin is not possible to search by the caption of 
   images, but with a simple change in the plugin code is possible the searching
   by caption too:
 * Open the searchinplace.clss.php file for edition and go to the snippet of code:
 * $posts = array_merge($wp_query->posts, $wpdb->get_results(“SELECT * FROM $wpdb-
   >posts WHERE post_type=’attachment’ AND post_status=’inherit’ AND (post_title
   LIKE ‘$s%’ OR post_content LIKE ‘$s%’ OR post_name LIKE ‘$s%’) AND post_parent
   IN (SELECT ID FROM $wpdb->posts WHERE post_status=’publish’) LIMIT $limit”, OBJECT));
 * Modifies the previous piece of code as below:
 * $posts = array_merge($wp_query->posts, $wpdb->get_results(“SELECT * FROM $wpdb-
   >posts WHERE post_type=’attachment’ AND post_status=’inherit’ AND (post_title
   LIKE ‘$s%’ OR post_content LIKE ‘$s%’ OR post_name LIKE ‘$s%’ OR post_excerpt
   LIKE ‘$s’) AND post_parent IN (SELECT ID FROM $wpdb->posts WHERE post_status=’
   publish’) LIMIT $limit”, OBJECT));
 * This feature will be included in the current version of the plugin.
 * Best regards.
 *  Plugin Author [codepeople](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/attachment-search-issues/#post-3737673)
 * Hi,
 * I’m sorry, I’ve forgot the percent symbol (%)
 * $posts = array_merge($wp_query->posts, $wpdb->get_results(“SELECT * FROM $wpdb-
   >posts WHERE post_type=’attachment’ AND post_status=’inherit’ AND (post_title
   LIKE ‘$s%’ OR post_content LIKE ‘$s%’ OR post_name LIKE ‘$s%’ OR post_excerpt
   LIKE ‘$s%’) AND post_parent IN (SELECT ID FROM $wpdb->posts WHERE post_status
   =’publish’) LIMIT $limit”, OBJECT));

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

The topic ‘Attachment search issues’ is closed to new replies.

 * ![](https://ps.w.org/search-in-place/assets/icon-256x256.jpg?rev=975466)
 * [Search in Place](https://wordpress.org/plugins/search-in-place/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/search-in-place/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/search-in-place/)
 * [Active Topics](https://wordpress.org/support/plugin/search-in-place/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/search-in-place/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/search-in-place/reviews/)

## Tags

 * [attachment](https://wordpress.org/support/topic-tag/attachment/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * 5 replies
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/attachment-search-issues/#post-3737673)
 * Status: resolved