- This topic has 12 replies, 2 voices, and was last updated 9 years, 8 months ago by .
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Custom fields not displaying
Hi Yvonne
As promised, you would need args like this:
$args = array(
'post_type' => 'resources',
'post_status' => 'publish',
'posts_per_page' => '10',
'search_filter_id' => '456'
);
Not sure if it actually needs the quotes around the 456 (is that the ID number for your form?)
Hi Trevor,
Thank you for the code.
I managed to get the keyword search form portion working now. I can search for keyword terms and return the expected results with the fields displaying now.
So I went ahead and added some extra fields to the search form, such as Tags, Categories and a date picker. Unfortunately, the search form is not picking up those fields, meaning the search form is not displaying the count for those beside its label. And it is not displaying any results when using those fields to search.
I have Relevanssi enabled.
How do I get the category and tag fields to display in my results and to display the count on the search form?
Two issues I think. If the fields are ACF field make sure the meta name in the form design in the select box where you picked the field does NOT start with an underscore.
The display of the fields in the results is down to your theme. You have to add them to the theme template file.