Skip Navigation

[Resolved] Custom search by category

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by johnC-6 1 year, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2527371

I have created a view for a custom post type name "Painting" where I can see search results by category. I am using checkboxes so you can choose more than one category. I want the search results to only show paintings that include both categories - I don't want paintings to show that have only one of the categories.

You can see the page here: hidden link

Thanks in advance for your help.
John

#2527579
taxonomy-filter-all.jpg

Hello,

It is possible with legacy editor post view, for example, you can try these:
1) Enable legacy editor:
https://toolset.com/course-lesson/enabling-legacy-version-of-toolset-views/

2) Create a post view
- Query "Painting" posts
- Add the taxonomy filter in custom search form,
- in section "Query Filter", change the taxonomy filter to:
Select posts with taxonomy:
Categories slug in all of those set by the URL parameter wpvcategory
eg. hidden link
See my screenshot taxonomy-filter-all.jpg

See below test site.
Login URL:
hidden link

Post view:
hidden link

Result page:
hidden link

#2532233
Screenshot 2023-01-11 at 11.57.06 AM.png

Hi,
I was able to figure out creating the view but I have another issue. I want to have a view search form on my homepage and the results on another page. I followed the directions here: https://toolset.com/forums/topic/displaying-search-result-on-different-page-i-cant-make-it-work/
I have the view set to refresh the page to see results. I added the View block but when I try to choose to show the results on another page I see the attached: No Options. I have the view results form on another page but the View block on the homepage gives me no options.

#2532249

My issue is resolved now. Thank you! I figured out what I was doing wrong.