0

I have to change product links in search result page to point specific category instead to product page. I want to get category of returned product and create link based on that.

Example:

Product: My first product
Category: testing

Current search result page display:

Title: My first product
URL: /products/my-first-product

Search result page should display:

Title: My first product
URL: /testing

I have copied search.php in the child theme but how to continue?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.