AnonymousInactive
One more question, how do I style results.php file? I see it uses search-filter.min.css file is that the one I need to modify or I can just add new styling to the style.css in my child theme?
Thanks again,
D.
AnonymousInactive
Thank you Ross. I think I’ll use results.php and will just add some code from the masonry template to make it look decent.
Can you give me some guidance/directions on how to find which part of my theme is causing daterange field not working?
AnonymousInactive
Hi Ross ๐
I read in this forum that the best template to use for woocommerce is archive-product.php.
I’m using the shortcode method, but I don’t understand if I have to modify my results.php page in order to look like archive-product.php (using woocommerce functions, such as do_action( ‘woocommerce_before_shop_loop’)) or if it’s simply a matter of css.
Now my search works, but the results are in list and not in grid.
I’m trying to understand by reading your guide here
https://support.searchandfilter.com/forums/search/woocommerce-page/
Is it a good start? ๐
Hey Dmitriy
To create your layout as you mention is going to require a fair bit of coding – you’ll need some decent knowledge of html/css/js…
Not sure if you’ve read the differences between archive & shortcode methods:
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/docs/display-results/
Anyway, if you’re trying to create a masonry layout based on something existing in your theme, then the first thing I would do is is copy the html / loop structure from one of your templates that is using masonry,
Either find the PHP file responsible for displaying the masonry layout in your theme directory, or alternatively view the source HTML of a page which is displaying a masonry layout.
You’ll have to copy the html over to your results.php
– but it might not be straight forward – this will require tweaking.
In all cases I’m aware of, any true masonry layout requires Javascript, to make everything fit together and stack nicely. You’ll have to figure out how to trigger the masonry via JS in your theme. You’ll need to load the masonry script whenever the page loads, and whenever new results are loaded in – check the first question on the FAQs on how to detect when new results have loaded –
http://www.designsandcode.com/wordpress-plugins/search-filter-pro/faqs/
As mentioned above, it requires a certain level of knowledge to get a masonry layout working in your theme.
Alternatively, if you used the archive method (and overcame any issues there), I’m sure the html structure would already be correct, however you would still need to apply the masonry/JS logic to these pages.
Thanks
AnonymousInactive
Sorry, results.php template not reply.php mentioned above.
AnonymousInactive
BTW, your results.php template has a few missing tags:
<?php
while ($query->have_posts())
{
$query->the_post();
?>
<div>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p><br /><?php the_excerpt(); ?><p>
<?php
if ( has_post_thumbnail() ) {
echo '<p>';
the_post_thumbnail("small");
echo '</p>';
}
?>
<p><?php the_category(); ?><p>
<p><?php the_tags(); ?><p>
<p><small><?php the_date(); ?></small><p>
</div>
<hr />
<?php
}
?>
Notice a few <p> tags at the end that suppose to be a closing </p> tags.
AnonymousInactive
Thanks! I followed this:::::
!!!!!!1.Create a folder in your theme folder called search-filter.
2.Copy the file wp-content\plugins\search-filter\templates\results.php from the templates folder in to the newly created folder in your theme โ wp-content\themes\your-theme-name\search-filter\results.php
From now on, Search & Filter will load this version of the template instead of its own โ so you can make any customisations that are necessary.!!!!!
Search & Filter works and loads the Divi created Page, However this page does not honor all of the CSS code(as woocommerce and Divi do) and all of the other pages do. Any ideas>? This is my last hurdle!
AnonymousInactive
and I do this onto the custom results.php page?
Hey Sabrina
The template: Plugins > search-filter-pro > templates > results.php
, is only to be used when displaying results using a shortcode.
If you are using “as archive” there is no sample template, because it should be a template from your theme.
Take a look in your theme folder for templates you could use… under “display results” and under “filename” try any of the following: archive.php
, search.php
or index.php
, most themes have these templates as standard.
Thanks
AnonymousInactive
Hey,
I’ve got the settigns: Display as an archived page, and use a custom template for the results. When using the default template in: Plugins > search-filter-pro > templates > results.php, won’t work either. If I create a new template, remove the_loop stuff from WordPress and just print a <h1>Hello</h1>, this will be displayed in a blank page.
Wordpress version: 4.2.2
S&F version: 1.4.3
Does anyone know why it won’t load the template in correctly?