Forums › Forums › Search & Filter Pro › S&F with ACF problem
Tagged: acf
- This topic has 9 replies, 2 voices, and was last updated 8 years, 1 month ago by Anonymous.
-
Anonymous(Private) October 12, 2016 at 2:17 pm #63527
Hello,
Thanks for great plugin.
I have ACF plugin and created field “colors”: checkbox with values:
red : Red
blue : BlueI installed “Relevanssi” plugin, and set “Custom fields to index” to “all”.
Then i created a new search form and enabled “Relevanssi”, and added “Post Meta” for this field with “Is ACF Field?”But there is no results!
How to resolve it?Thanks.
Trevor(Private) October 12, 2016 at 4:28 pm #63582Hi
I disabled the template option (where search.php was set as the template), which isn’t always a good thing to do, and then it works. Which means it is a template issue.
So, I opened search.php and on line 30, I see this:
<?php if( have_posts() && trim( $_GET['s'] ) ): ?>
I have remarked that line out and added a new line 31 below it:
<?php if( have_posts() ): ?>
The original was checking if a theme search was being done.
What do you need to do now?
Copy the search.php file I edited (which is in the betheme theme folder and paste a copy of it into the child theme folder). That should preserve this changed copy.
-
AuthorPosts