Forums › Forums › Search & Filter Pro › Search result page cant't work with Avada theme
Tagged: Avada, display results, filter, poduct
- This topic has 18 replies, 1 voice, and was last updated 1 year, 9 months ago by
Anonymous.
-
Ross Moderator(Private) April 4, 2015 at 1:11 pm #14550
Thanks Diego, its a national holiday here so I may not be able to look at this for a couple of days.
Ross
Anonymous(Private) April 7, 2015 at 7:55 pm #14693Hi again Ross,
I recently switched to Avada per your recommendation, and currently have the same exact issue as Diego.
After performing all of the steps outlined by Diego, I am in the same boat. No results are showing up. Error “Couldn’t find what you’re looking for”.
Any help would be greatly appreciated!
Ross Moderator(Private) April 8, 2015 at 2:04 pm #14721Hi both will have a look later on.
I’ve only tested this with the default search template, as per the instructions on the FAQs, however I’ll take a quick look this evening and see if I can get it working.
Can you confirm that you are trying to set it up with search.php?
Also, I may be using a slightly out of date version of Avada – can you both let me know which versions you are using?
Thanks
Ross Moderator(Private) April 10, 2015 at 12:59 pm #14859Looking at this now – hopefully its something simple! ;(
Ross Moderator(Private) April 10, 2015 at 4:03 pm #14869Okkkkkk
So I downloaded the latest version of Avada and did a test with the Search template – all working! There may be another gotcha in those templates!
So the first thing I did was comment out line 71:
//query_posts($query_string.'&posts_per_page='.$smof_data['search_results_per_page'].'&paged='.$page_num);
I built a search form with a Search Field, and submit button – did a test, it worked great.
After I did a search again, with no search term entered (a blank search) – then I got no results, instead of the list of all results I was expecting from S&F…
What I realised was, Avada checks to see if there is a search term in the url (
?s=search+term
) before displaying the results.So, if you are using S&F without a search field, or want to submit a blank search there is one more step to take.
Line 74 checks to see if there are posts AND a search term before displaying results, so:
<?php if ( have_posts() && strlen( trim(get_search_query()) ) != 0 ) : ?>
Should be changed to:
<?php if ( have_posts() ) : ?>
I hope that it!!
Thanks
Anonymous(Private) April 10, 2015 at 4:33 pm #14874Ross
You are so great! YA~YA~ Thanks!
Finally I can show the website product filter result to the company PM.
I’m really happy now.Ha.
Thanks again.Another question, how should I can display the search result layout look like the Avada search result?
The S&F serach result:
http://jejetaxi.com/ymc/wp-content/uploads/2015/04/sfrsu.pngThe Avada search result:
http://jejetaxi.com/ymc/wp-content/uploads/2015/04/avadarsu.pngShould I make the search result redirecting or use another php program?
Thanks againDiego
Ross Moderator(Private) April 10, 2015 at 4:47 pm #14875Hi Diego
To change the style of the results you must customise
search-filter.php
to your needs.Or start with a different template (not search.php) however I don’t have much experience with that and is a customisation you must make yourself.
Thanks
-
AuthorPosts