Tagged: Product Grid, product slider
-
AuthorPosts
-
October 17, 2018 at 4:31 pm #1022860
Hi,
i use enfold 4.5 and Woocommerce 3.4.6 and want to change the look of my startpage. For that I want to use the product grid and product slider. But I can select any taxonomy … the grid and the slider always show all products.
Please help. Thank you!October 18, 2018 at 5:28 pm #1023505Hey Martin,
Credentials did not work for me. Could you please update the credentials?
Best regards,
VictoriaOctober 18, 2018 at 8:27 pm #1023623This reply has been marked as private.October 21, 2018 at 6:36 pm #1024552Hi Martin,
A brochure is also a product and so it is shown in the product grid.
Best regards,
VictoriaOctober 22, 2018 at 9:24 am #1024745No, you missunderstood me. There are is a product category with the title “Produkte” and e product category with the title “Broschüren”. In the product slider I just want to show the products of the categroy “Produkte”. But it shows always all products, even if I choose the category “Produkte” in the configuration of the product slider.
Best regards,
MartinOctober 22, 2018 at 7:06 pm #1025059Hi Martin,
The thing is that there should not be a category called products, there can be a slug conflict and it might not behave as expected.
Best regards,
VictoriaOctober 22, 2018 at 9:33 pm #1025136Hi Victoria,
changed the name of the category … sorry, same result! The Slider still shows the products of all categories.Best regards,
Martin- This reply was modified 6 years ago by MetrixMF.
October 23, 2018 at 8:49 pm #1025611Hi Martin,
Best regards,
VictoriaOctober 23, 2018 at 9:17 pm #1025627Hi Victoria,
deleted these files (dont need it really … just wanted to try out something), but nothing changed.
Best regards,
MartinOctober 24, 2018 at 6:14 pm #1026029October 25, 2018 at 3:42 pm #1026373Hi,
I duplicated the installation and disabled all plugins beside woocommerce. Same result.
Best regards,
MartinOctober 30, 2018 at 2:42 am #1027806Hi,
The following code in the functions.php file alters the product slider query.
add_action( 'pre_get_posts', 'hidden_search_query_fix' ); function hidden_search_query_fix( $query = false ) { if ( ! is_admin() && isset( $query->query['post_type'] ) && $query->query['post_type'] === 'product' ) { $tax_query = $query->get( 'tax_query' ); $tax_query = array(); $tax_query[] = [ 'relation' => 'OR', [ 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'exclude-from-catalog', 'operator' => 'NOT IN', ], [ 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'exclude-from-catalog', 'operator' => '!=', ], ]; $query->set( 'tax_query', $tax_query ); } }
The product slider works properly when it’s disabled.
Best regards,
IsmaelNovember 5, 2018 at 7:20 pm #1030001Ups! Thank you! Sometimes you don’t see that “simple” things.
Best regards,
MartinNovember 5, 2018 at 11:24 pm #1030099Hi,
I’m glad you were able to get this solved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon -
AuthorPosts
- The topic ‘product grid and product slider ignore taxonomy selection’ is closed to new replies.