Sauter la navigation

[Résolu] How to limit Post Reference search/select to only the titles of the CPT

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 5 années et 6 mois. 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)

Marqué : 

Ce sujet contient 3 réponses, a 2 voix.

Dernière mise à jour par Anthony Il y a 5 années et 5 mois.

Assisté par: Shane.

Auteur
Publications
#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: lien caché . 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

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Anthony,

I've escalated this one for you.

Thanks,
Shane

#1286841

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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. 🙂