Skip Navigation

[Resolved] Can I create a search within a CPT that will encompass custom taxonomies attache

This support ticket is created 2 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 2 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2471111

Tell us what you are trying to do?

I'd like to create a custom post type using Toolset.
After that, I would like to create a search form with a single field.
Normally WordPress search includes Title, Content and Excerpt.

I'd like to know if, using Toolset, I can customise the search to encompass values attached to custom taxonomies that are attached to the post type targeted by a search.

Is there any documentation that you are following?

I've been looking at the WordPress documentation for WP_Query and tax_query.
But I've been unable to figure out a practical solution.

Is there a similar example that we can see?

Not that I know if.

What is the link to your site?

Under development.

#2471235

Hi,

Thank you for contacting us and I'd be happy to assist.

The Toolset's views custom search can be used to search through the custom taxonomies and custom fields, directly attached to the post type that is being searched through.
( ref: https://toolset.com/course-chapter/creating-custom-searches-for-directory-items/ )

However, it doesn't support extending the search to the term custom fields attached to the related taxonomy(s).

So, you'll need to make sure that any data that you'd like to use for the search, is directly attached to the post type.

regards,
Waqar