G
G
gogadesign2020-11-01 14:18:02
WooCommerce
gogadesign, 2020-11-01 14:18:02

How to split search result template by products in Woocommerce?

I want to use my own product search result template. It is currently merged with the archive-product.php template. As far as I understand, I should write the if (! is_search() condition in it, but I don’t understand how exactly to register all this in order to redirect to my template page.
How should it look like inside?

if (! is_search() ) {
//...
} else {
//...
}   ?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WP Panda, 2020-11-01
@wppanda5 WooCommerce

What prevents you from using heatlate search.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question