Okay
  Public Ticket #3179270
Search within a specific category only
Closed

Comments

  • Szasz Miklos started the conversation

    Dear Sir/Madam, 

    In Woocommerce, I would like to put a „Ajax Search” on each product category page that only searches for products in that category. I set the product category in the "Include By Terms" option in the „Posts Query”. But when I press enter during use, products with the same name from other categories also appear.

    Example: I have a Mercedes and a BMW category. I have a first bumper product for both. When I'm in the Mercedes category and enter the search term "front bumper" in the „Ajax Search”, only Mercedes parts appear under the search icon, but when I press enter, the BMW bumper is also listed.

    "Posts Source" is set to "Custom Posts".

    "Post Types" is set to "Product".

    But whatever I type in the search field, even if no results appear under the search field, it is still listed after pressing Enter. In other words, if I press Enter, everything is listed on the "Search Results" page, and I want only what appears under the search field to appear on the "Search Results" page as well.

    Thank you in advance for your help.

    Attached files:  2022-12-01 12-12-11.mkv

  •   Max replied privately