Skip Navigation

[Resolved] Search posts with dropdown title filter

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to set up a custom search form that includes a dropdown filter containing post titles.

Solution: This would require custom code. A text input is offered for post title searches, but not a select filter.

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Christian Cox 6 years, 10 months ago.

Assisted by: Christian Cox.

Author
Posts
#622113

Tell us what you are trying to do?
I would like to be able to search (regular) posts with a dropdown populated with the title from custom post type called "author". This is NOT the author of the post, but the author of a book. The custom post type has the author name in the title, it is not a custom field.
So, I would not need to search the entire site, just the titles and content of the news items (standard WP post type) by means of a dropdown populated with the titles of another post type.

Is there any documentation that you are following?
Couldn't find any.

Is there a similar example that we can see?
Not sure! Sorry.

What is the link to your site?
hidden link

#622138

To be more clear:

post type: author --> title of that post type in dropdown --> when selected use as string to search standard post type content and titles

#622320

Hi, there's not a built-in way to use post titles in a drop-down search filter. Post relationship filters include post title drop-downs, but in this case I do not think it will be helpful for you because there is no post relationship involved. The text search feature will allow users to search for post title using free text, but not a select field. So unfortunately we do not offer exactly what you're looking for. A skilled developer could help you set up a post title dropdown filter using custom code and our wpv_filter_query API: https://toolset.com/documentation/programmer-reference/views-filters/#wpv_filter_query

We offer a portal where you can connect with developers who know how to customize Toolset: https://toolset.com/contractors

The forum ‘Types Community Support’ is closed to new topics and replies.