AnonymousInactive
When i search a keyword, i can find the result, but there is a description under the result” Fatal error: Call to a member function list_attributes() on a non-object in /home/shunshan/public_html/newsite/wp-content/themes/church-event/search-filter/results.php on line 72″, please help, thanks:)
OK. Step 1, what is the URL of the page with the search on? OR, is it on the planning archive page (e.g. http://www.mysite.com/planning/
)? If it is on the standard archives page (the latter) AND you want to use our results.php template file (make sure it is a copy in your theme folder) then I think it always used the theme’s blog template.
AnonymousInactive
Hi Trevor,
Thanks so much! That is working for me. Now the only thing is that it seems to be using the “home” template file instead of my actual “planning-page.php” template (meaning the body has 'class="home blog search search-results logged-in admin-bar customize-support"'
instead of 'class="page page-id-30 page-template page-template-planning-page page-template-planning-page-php logged-in admin-bar customize-support"'
) this is what’s throwing off the layout and displaying that big white space a mentioned in my first message.
I customized ‘results.php’ as your tutorial mentions so my results are appearing as I want them to, but is there another file I need to edit so that it actually uses my ‘planning-page.php’ wrapper and not the home wrapper?
Many many thanks!
Before you updated, did you follow the customizing guide:
https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results
Specifically, putting a local copy of the results.php file in the theme (or better still child theme) folder?
AnonymousInactive
Thanks very much, Trevor.
Followed your guideline to do it via FTP and it’s working now.
Can I please ask you another quick question? In the search results page, the titles are in h2 but I want to have them in h4 instead. Previously I edited the S&F results.php to change the size, but lost that change now that I updated the plugin. Is there an easier way of doing this? A css code I can put into my theme custom css, for example?
Many thanks again.
AnonymousInactive
Thanks for the response. In settings I have the front page as static & the chosen template doesn’t use any custom queries. It’s wrapped in “if ( have_posts() ) while ( have_posts() ) : the_post();” & that’s it. What’s in between is the search form shortcode & the results shortcode wrapped in the results div.
When I use the template on inner pages, everything works fine and I’m currently using results.php (with the default structure).
I created front-page.php as a replica of the chosen front-page template because I saw someone mention that as a potential solution, but had no luck.
I’ve tried using an archive, but I’m a bit confused tbh & can’t get it to work. I feel like the shortcode method should be doable. I’m very close – it’s just those pesky parameters. Thanks again!
In the WordPress settings, does your home page contain the blog, or is it a specific page?
In general, the shortcode results method needs to use our results.php template (see our documentation on this), which is often a problem for some themes, especially if the main blog is on the home page. Some users edit the theme template file for their home page and add the shortcode id to the arguments being passed to the wp query, but this has the drawback that a theme update will overwrite this.
The most common rsults method used for home pages in the display as an archive method, where you can then specify the same template as is already used by the theme for the home page.
Hi
You appear to be using the shortcode results method. Did you make the custom copy of the results.php template file, as documented here?
https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results
It will not fix the issue, but it is where we start from. I have not made one for Enfold before, but anything is possible. Do you have a sample page of what you want it to look like (on your site or the theme demo pages)?
AnonymousInactive
Hello,
I’m using S&F Pro on the following page: http://2e8.bbe.myftpupload.com/dining-guide/
Function is excellent, however, the basic formatting (bold, italics, line-breaks) in my posts content on the results page is not displaying. Is there something I need to adjust in the results.php to allow the formatting to display? Other solution? I’m using the enfold theme but noticed the same issue when switching to twenty-fifteen theme to troubleshoot. Your demo shows nice formatting so it must be doable.
Thanks,
Jay
Hi
You can have only one general ‘search’ field per form, as you say. It can search across the custom fields when you use Relevanssi.
If you are using the shortcode method, S&F uses it own results.php template; for other display methods the theme templates are used, so you would have to edit them.
The documentation shows how to set up and use a customizable results.php template:
https://www.designsandcode.com/documentation/search-filter-pro/search-results/using-a-shortcode/#Customising_the_Results