Skip Navigation

[Gelöst] How to limit Post Reference search/select to only the titles of the CPT

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 5 Jahren, 5 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Anthony vor 5 Jahren, 4 Monaten.

Assistiert von: Shane.

Author
Artikel
#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: versteckter 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

Sprachen: Englisch (English )

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

Hi Anthony,

I've escalated this one for you.

Thanks,
Shane

#1286841

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: 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. 🙂