• Resolved no6una9a

    (@no6una9a)


    Hello, I have a maybe silly question: When I search for products with FiboSearch on my WooCommerce site the resulting page capacity for displaying products is a grid of 3 x 3 and the last item in the result grid is always empty. I.e. if the search result is 12 products it is displayed with 8 products and on the second page the remaining 4 products are displayed. Is this normal behaviour that 8 instead of nine products per search result page (one less then the display capacity) are displayed?

    Kind regards, Nobunaga

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Damian Góra

    (@damian-gora)

    Hi Nobunaga,

    You actually have pagination set to 8 products per page for WooCommerce search results and 12 products per page for category archives. FiboSearch doesn’t affect pagination, so the issue lies elsewhere, outside the plugin. I’ll try to guess what might be causing this:

    1. Go to Appearance → Customize → WooCommerce → Archives → Products Per Page and check if it is set to 12 products.
    2. Make sure you don’t have any snippets that might be modifying the number of products per page.
    3. If you’re using Elementor to display products on the search results page, check the settings of the widget you use to display products and see if a different “Products per page” value is set there.

    If none of my suggestions help, try posting your question on the OceanWP forum. I can see that they are actively engaged in resolving issues related to their theme.

    Thread Starter no6una9a

    (@no6una9a)

    Thanx for your quick reply: I checked all off your suggestions unfortunately without positive effect. BUT you pointed me into the right direction: I could not find any existing code change being responsible for the 8 instead of 9 archive products search results displayed so I fixed it by using the following code which sets the 9 instead 8 and therfore solved my problem:

    // change the number of search results per page
    add_filter( 'pre_get_posts', 'myprefix_search_posts_per_page', 20, 1 );
    function myprefix_search_posts_per_page( $query ) {
    // only in the frontend
    if ( ! is_admin() && $query->is_main_query() ) {
    if ( $query->is_search() ) {
    $query->set( 'posts_per_page', 8 );
    }
    }
    }

    Thank you very much! Kind regards, Nobunaga

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.