[WordPress Plugin] Attachments allows you to simply append any number of items from your WordPress Media Library to Posts, Pages, and Custom Post Types
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?
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?