Duplicate search product results in search bar

Solved4 replies3 participantsUpdated by Tony Rodriguez

  • Avatar: lukabp
    lukabp
    Participant

    Hello,
    When I search for a product using its code/SKU (e.g., 40959), the search results show duplicate items. The first two results are correct (with images), but the next two are duplicates with missing images (showing the default placeholder). The result counter says “Found 2 products”, but 4 items are displayed in the layout.
    It seems like the search function is querying the database twice (once for the Title and once for the SKU) and duplicating the output instead of merging it.
    Could you please check why this is happening and how to fix it so that SKU search works without duplicating the products?
    Attached are the screenshots of the search results and my current Theme Options settings.
    Thank you!

    Please, contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.

    4 Answers

    Avatar: Jack Richardson
    Jack Richardson
    Support staff

    Hello @lukabp,

    Could you please check it now? The issue occurred because the search was configured to include the product variation post type, which caused a conflict due to duplicate entries. We have excluded the “product variation” post type from the search results, and the results are now displayed correctly in both the AJAX search and the search results page.

    Best regards,
    Jack Richardson
    The 8Theme’s Team

    Avatar: lukabp
    lukabp
    Participant

    Now is okay.
    Thank you.

    Best regards,
    Luka

    Avatar: lukabp
    lukabp
    Participant

    Thanks for the support! My topic “Duplicate search product results in search bar” has been successfully resolved.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff

    Dear lukabp,

    We really appreciate your time and engagement within the WordPress & WooCommerce community

    Your feedback drives every improvement we make in XStore — helping us deliver a smoother and more flexible experience with each update.

    Your input makes a real difference.

    Topic closed.
    The 8Theme Team

The issue related to '‘Duplicate search product results in search bar’' has been successfully resolved, and the topic is now closed for further responses