jchristopher / attachments

[WordPress Plugin] Attachments allows you to simply append any number of items from your WordPress Media Library to Posts, Pages, and Custom Post Types
wordpress.org/extend/plugins/attachments/
GNU General Public License v2.0
239 stars 78 forks source link

search for value in select field #135

Closed zzramesses closed 6 years ago

zzramesses commented 10 years ago

here are my search args and my search $search_args = array( 'instance' => 'hmc_header_image_attachments',
'post_type' => 'page', 'post_id' => $post->ID, 'fields' => 'title', ); $attachments->search( 'misty copeland' , $search_args );

The above works fine ONLY if I specify the fields. If I remove the fields from the search args I get the following warning twice: Warning: strtolower() expects parameter 1 to be string, array given in /srv/www/hmc/htdocs/wp-content/plugins/attachments/classes/class.attachments.search.php on line 137

This instance of attachments has a select dropdown that I am trying to search. When I specific 'fields' => 'region_select' (which is my select field) I get the same warning. Is it possible to search for a value in a select field?

jchristopher commented 6 years ago

Hello, given the age of this Issue I'm going to mark it as Closed but if this is still a problem please comment here!