Search Results Instantly Going To The Product Page

Hi there,

I’ve currently got a search function for all searching products. Currently, it’s going to the product directly if it can find no other products with that term. For example, if you search “Rosehip” it goes straight to the product, not the search query page.

I’d like it to go to the search query page, rather than the product.

I also have a piece of dynamic text showing the stock availability (I’ve built the search query page using layout builder).

But on both, the search query page and product page items that have no stock do not display the " Out Of Stock" message.

For example https://kugelmans.com/product/peppermint-leaf/

  • Could someone please advise?

Hi Claudio,

Thank you for writing in, please do the following.

  • Ensure that you are fully up to date. WordPress, Theme, and Cornerstone (Version Compatibility)

  • Clear all the site caches (plugin, server-side, CDN, and browser’s cache) so that the code from the latest release is always in use. This will help you to avoid any potential errors. While you’re at it, please deactivate this caching feature while we tackle this issue.

  • Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes,
Cheers!

Thank you but I’ve already run through the normal troubleshooting steps.

Are there specific answers you can give in relation to the issue I’m experiencing?

Thanks for your help

Hi Claudio,

Sorry for the confusion, that is actually a native feature of the Woocommerce Product search, where it automatically redirect to the post if the result return only one post. But if you search like “Rose” it will return multiple results and you will see your search result page. Regretfully we can not provide a custom code to modify this feature.

On your Layout add this dynamic content on a text element {{dc:post:meta key="_stock_status"}} this will show you the Stock Status of the product being viewed.

Cheers,

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.