Home › Forums › General Issues › search specific ACF field in admin/Posts › Reply To: search specific ACF field in admin/Posts
Instead of doing the query to get a list of all avialble fields, construct an array with the field that you want to search.
$fields = array(
'field_1',
'field_2',
'field_3',
'field_4',
'etc...'
);
then alter the code used to display the field to use this new array
foreach ($fields as $field) {
printf('<option value="%s"%s>%s</option>', $field, $field == $current? ' selected="selected"':'', $field);
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.