• Resolved josht24

    (@josht24)


    I’ve noticed an issue with the Search Bar functionality. When searching for a singular Item, in this case a Table, the search will lead to the actual collection. However, if searching for an actual Category name, such as Tables, it leads to a single product page. I’m curious if this is a known issue, and if there is a way to fix this issue.

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

Viewing 1 replies (of 1 total)
  • Kris

    (@c0nst)

    Hi @josht24!

    When searching for “Tables,” if there is only one product search result, WooCommerce will automatically redirect you to the product page. This behavior is a default WooCommerce feature intended to streamline the user experience. Below is a code snippet to disable it:

    add_filter( 'woocommerce_redirect_single_search_result', '__return_false' );

    You have two ways to add this code to your theme:

    1. Open the?functions.php?in your Child Theme and add the code at the end
    2. Install the?Code Snippets?plugin and apply this code as a snippet

    Best regards,
    Kris

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