Skip Navigation

[Resolved] How to limit Post Reference search/select to only the titles of the CPT

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

Problem:

The issue here is that the user wanted to use the Post reference custom field but instead of searching through the Titles only, it is including posts with matching keywords in the content.

Solution:

The customer of this tread submitted a feature request for this and was reviewed by our team.

This support ticket is created 5 years, 5 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by Anthony 5 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1278527
03-Knight-of-Swords-Cards-post-body-text.190627.png
02-CRED-form-with-post-type-to-connect-search-text-and-result.190627.png
01-custom-field-post-type-to-connect-is-Cards.190627.png

I am building a CRED form for CPT "Reading" using custom fields that are a Post References to CPT "Cards".

Link to a page where the issue can be seen: hidden link . Try searching for "nine" in the selection field 'Position 1'.

I expect to see: The ideal search result would be only four Cards - Nine of Wands, Nine of Swords, Nine of Discs, and Nine of Cups .

Instead, I get: the four cards just mentioned but also the Knight of Swords because that Card's body text includes the word 'canniness' which contains the string 'nine'.

I'd like to be able to constrain the search/selection to only search post titles (and/or slugs), however currently the body text is searched as well, resulting in selection options that are inappropriate.

#1278771

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Anthony,

I've escalated this one for you.

Thanks,
Shane

#1286841

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Anthony,

Our 2nd tier supporters have done a thorough investigation on this and the conclusion would be that you should submit an official feature request for this.

https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

We are in agreement that this needs to be improved.

Thanks,
Shane

#1286913

I have submitted a feature request as suggested. 🙂