Skip Navigation

[Resolved] add custom search form to product archive to search ONLY in current product cat

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 12 months ago.

Author
Posts
#2668685

Tell us what you are trying to do?
add custom search form to product archive to search ONLY in current product cat

Is there any documentation that you are following?
https://toolset.com/forums/topic/custom-search-on-archive/ but i cannot understand WHERE and HOW shall insert the search form

Is there a similar example that we can see?
did not find any

What is the link to your site? hidden link

#2668807

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

What kind of search are we talking about? A text search of titles and content? Or filtering by some custom field or other taxonomy?

And which archive exactly are we talking about?

You say to add search to the "product archive" but only within the "current product category".

The product archive simply displays the product posts (it is essentially the shop page), and so what would the "current" product category be in that case?

Or do you mean the product category archive? In which case products with the product category specified in the URL are shown.

In which case, the products shown are already limited to those with the specified product category.

It's not clear what you are trying to achieve.

#2673701

thx i didn't notice the cusotm search was already pre-filtered in the current category. perfect!