Home Forums WoodMart support forum Search results infinite loading

Search results infinite loading

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #36071

    jalinmedia
    Participant

    Hi,

    We’ve in our store infinite loading. We also want this in the search results.
    Could you please tell us how we can do that?

    Thanks a lot!

    Kind regards,

    Jasper

    #36079

    Artem Temos
    Keymaster

    Hi,

    Unfortunately, WooCommerce doesn’t allow us to make ajax loading on the search page. Technically, it is not possible.

    Regards

    #36960

    jalinmedia
    Participant

    Hi,

    Thanks for your reaction!
    Can we set amount of search results on 36 per page?

    Like to hear from you soon!

    Kind regards,

    Jasper

    #36965

    Artem Temos
    Keymaster

    Hi,

    Try to add the following PHP code snippet to the child theme functions.php file to do this

    function woodmart_shop_products_per_page() {
    		$per_page = 12;
    		$number = apply_filters('woodmart_shop_per_page', woodmart_get_products_per_page() );
    		if( is_numeric( $number ) ) {
    			$per_page = $number;
    		}
    		if ( is_search() ) {
    			$per_page = 36;
    		}
    		return $per_page;
    	}
    
    	add_filter( 'loop_shop_per_page', 'woodmart_shop_products_per_page', 20 );
    #36971

    jalinmedia
    Participant

    Is this only in the search results? Because we’ve infinit loading in the shop.

    Thanks!

    #36972

    Artem Temos
    Keymaster

    Yes, it is for the search page only.

Viewing 6 posts - 1 through 6 (of 6 total)