Forums › Forums › Search & Filter Pro › Displaying posts instead of products
Tagged: woocommerce
- This topic has 7 replies, 2 voices, and was last updated 9 years, 3 months ago by Ross.
-
Anonymous(Private) July 10, 2015 at 11:40 pm #21260
Hello I’m running a woocommerce website, there is a number of problems atm:
1.- Showing blog posts along with products. I need to only display products using that tags.
Setting of Search Form:
Search in the following post types: Only checked Products checkbox.When clicking a tag
Im getting this url:http://arentalocal.mx:8080/result/?_sft_post_tag=dress
I think this should be the url: http://arentalocal.mx:8080/product-tag/fashion/2.- Incorrecto result page
Where should I add the results shortcode?
In archive-product.php?Anonymous(Private) July 11, 2015 at 12:29 am #21262Edit problem 1:
I have the correct number in each now. Seems fixed by now.Edit problem 2:
I manage to partially solve this problem by adding this to my functions.phpfunction search_and_filter(){ echo do_shortcode('[searchandfilter id="1836" show="results"]'); } add_action('woocommerce_before_shop_loop','search_and_filter');
Howvever it lose all the CSS. Instead of displaying 4 product images in a fixed size, it shows 1 product with his own size, among others CSS errors.
Anonymous(Private) July 11, 2015 at 1:21 am #21264Update Problem 2:
Setting of my search form:
Display using shortcodeI got 2 identical set of products displayed in the shop-page
One set is at top with no CSS (filters with ajax work with them).
One set is ordered at bottom with my custom CSS (filters dont work on them).Ross Moderator(Private) July 12, 2015 at 11:35 pm #21308Hi there
To answer your questions:
1) The count numbers are not dynamic and do not reflect the real live values based on the current search – they are based on WP internal count of these taxonomies – the next version of S&F will change this and they will be dynamic.
2) S&F works with WooCommerce, in that you can search WooCommerce Products, and search attributes and custom fields – but it is not a filter to be used with the Shop page directly (I will add this at some stage).
You need to think of this a little different, so on your shop page you can add the S&F form, but realise, once a user searches – they will be taken “away” to a search result page.
Now what you must do is recreate the format of the shop page if that is what you wish.
If you are using Display using shortcode, then you should just paste the shortcode in to an empty page – and have the Results URL point to this new page. You will then have to customise the html/css to emulate the look of your shop page.
Alternatively, you could try using the As Archive method – the WooCommerce product archive is usually calls the WooCommerce template
archive-product.php
and you could try modifying using this with some modification for your S&F results.Some other users have across this see here – https://support.searchandfilter.com/forums/search/archive-product/
Thanks
Ross Moderator(Private) July 14, 2015 at 11:15 am #21401Hey there, your custom CSS?
The best place is in your themes CSS file – if you are having problems seeing the styles try adding
!important
rules as your themes CSS *may* be loaded before S&F base CSS.Thanks
-
AuthorPosts