The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
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 9 months, 2 weeks ago by
Joanne Spinardi.
-
Diego Chang(Private) April 4, 2015 at 9:41 am #14548
Hi Rose
I use S&F pro plugin in Avada theme and use the portfolio type try to make the product filter.
You can see the categories & taxonomies works fine and display product count number normally.
http://jejetaxi.com/ymc/our-work/I have tried the method in this page suggestion “http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/#h-bad-template”
In the S&F -[Display results] choose the [As an archive page] option, and make a copy of serach.php an rename it to search-filter.php and remove the code in line 71 “
query_posts($query_string.’&posts_per_page=’.$smof_data[‘search_results_per_page’].’&paged=’.$page_num);
”In the [Advance] option page checked the [Force is_search to always be true?]
But when I use the three level filter try to find my product, the search result still show nothing(wrong).
I had try different methon a couple days and still can solve the problem.
Do I make something lose in the setting? or how should I do so I can get the right result?
Please help me.
ThanksThe setting option image
http://jejetaxi.com/ymc/wp-content/uploads/2015/04/SF001.png
http://jejetaxi.com/ymc/wp-content/uploads/2015/04/SF002.png
http://jejetaxi.com/ymc/wp-content/uploads/2015/04/SF003.pngRoss Moderator(Private) April 4, 2015 at 1:11 pm #14550Thanks Diego, its a national holiday here so I may not be able to look at this for a couple of days.
Ross
Mike(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! ;(
Diego Chang(Private) April 10, 2015 at 2:36 pm #14863Ross
Really hope S&F pro can work with Avada theme asap.
ThanksRoss 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
Diego Chang(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
-
AuthorPosts
The forum ‘Search & Filter Pro’ is closed to new topics and replies.