Forums › Forums › Search & Filter Pro › Woocommerce integration
Tagged: echo do shortcode, results, Template, woocommerce
- This topic has 17 replies, 3 voices, and was last updated 9 years, 6 months ago by Ross.
-
Ross Moderator(Private) January 8, 2015 at 2:41 pm #9937
Your results container is ‘#content’ – this means that this container is emptied, and replaced with your results. Because your search form is inside this container it also disappears.
You must either move the shortcode out the container called
#content
or use a more specific results container (in your ajax settings) – it looks like you may be able to useul.products
instead of#content
.Let me know 🙂
Thanks
Anonymous(Private) January 8, 2015 at 2:54 pm #9940Hi Ross, I’m lost. For some reason Woocommerce is displaying the Products on the ‘Products’ page but it doesn’t show the searchwidget. I tried many things to get it solved. But I’m missing something.
My customer wants to have the search/filter on top of the page with the results below. Moving the searchform to an widget is no option.
What am I doing wrong?
BTW your support is outstanding, I’ll put a nice review for you!
Ross Moderator(Private) January 8, 2015 at 3:00 pm #9941Hey Janno
In this case you must put the search form on the product archive page… so place the shortcode in your theme file (archive-product.php) above the results!
To add a shortcode to a themefile you just wrap it in a functions and possibly php tags:
<?php do_shortcode('[searchandfilter id="99"]'); ?>
Thanks for the kind words.
Anonymous(Private) June 11, 2015 at 3:15 am #19316I added the do shortcode to by archive page and it does appear but for some reason the search doesn’t load correctly the first time – I get ugly boxes and either no script or no css or both I am not sure
– I have to manually reload the page for the form to appear correctly. When I do hit refresh in browser it looks fine.
-
AuthorPosts