• Resolved inomi13

    (@inomi13)


    I have problem because when i use widget “Woocommerce Product Grid” I seted Products Source: Current Query Product on search results page. Everythink is works but when i write nothing, widget show all products and posts and pages. How can i change widget to show only products

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Unlimited Elements

    (@unitecms)

    Hi. I need to check. Could you please write us a support ticket.from our site i will check this issue with you and fix the bugs if needed.

    I added a snippet of code below and now my “Woocommerce Product Grid” widget only displays products in the search form results.

    Now I have a problem with pagination because if I have one product, pagination in search results sholud shows only 1 page but still shows 3 pages because pagination still load post_type = post. Someone habe any solution this problem?

    function myQueryFilter($args, $widgetControlsValues){
    	$args = array(
    	'post_type' => product
    );
    	return($args);
    }
    
    add_filter("my_query_filter", "myQueryFilter", 10, 2);
    Plugin Author Unlimited Elements

    (@unitecms)

    Hi. You have some complex issue. Generally our pagination read the archive query on archive page and not grid query. Anyway please open ticket from our site we will try to help

    I can’t open ticket in your page because my licence is over. Can you help in this forum ?

    Can you help me in this forum? I will add the condition item.products.woo_type is not empty in widget Woocommerce Product Grid so I don’t need a snippet in function.php. Widget shows only products but still I don’t know how to change the archive page to have working pagination.

    • This reply was modified 3 years, 1 month ago by inomi.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Widget Woocommerce product on search page’ is closed to new replies.