G
G
Genri_Rus2020-05-01 20:39:05
WordPress
Genri_Rus, 2020-05-01 20:39:05

How to override default search pattern?

In general, there is a standard search.php template file

. for standard wordpress blog posts on the page, there is only one search, but how to make the search for products have a different markup?

Let's say in woocommerce:
1. For categories, one template - content-product-cat.php
2. For the product itself - content-single-product.php

But for the search page, you can somehow determine that it is products that are being searched, and not entries?

Maybe it can be determined by taxonomy or post_type ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lev Rozanov, 2020-05-01
@Genri_Rus

Example via onclick

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question