Skip Navigation

[Fermé] how to filter from certain values in a SELECT field

This support ticket is created Il y a 9 années et 4 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.

Our next available supporter will start replying to tickets in about 0.89 hours from now. Thank you for your understanding.

This topic contains 6 réponses, has 3 voix.

Last updated by Juan Il y a 9 années et 4 mois.

Assigned support staff: Bigul.

Auteur
Publications
#72515
Screen Shot 2013-04-01 at 11.31.47 PM.png
Screen Shot 2013-04-01 at 11.33.40 PM.png

hello,

I'm trying to figure out how to display a certain list of officers from the master list, based on their officer Title

I'm trying to filter the query, but it's not working. Nothing shows up. I have a feeling this is simple, but I seem to be missing a fundamental element from this.
Please help. I bought this plugin a while ago, but run into issues each time. hope third time's a charm...

-matt

#72602

Bigul
Supporter

Hi Matthew,

Are you able to view Filter in pages with Views ? Please check following link. Hope it will help you.

https://toolset.com/documentation/user-guides/front-page-filters/

--
With Regards

Bigul

#72835

Hi Bigul,

This is not what I need. I'm trying to use filter in views template. What I want to do is only display a certain list of officers, ones that have a certain title.
For instance, I have a person who has the title "Regional Bailli" and also have someone with the title "Vice Chancelier-Argentier". I want to show only these (plus a few more) on this Officer listing page.

here's page: hidden link

just need to know what to put in the filter to display these...

#72885

Bigul
Supporter

Hi Matthew,

You can use the custom field content where you are using the display text. Because the filter does not care about the display text used, it just needs the custom field content.


With Regards

Bigul

#72886

ok, but it doesn't seem to be working with how I entered for the filter query... This is where I'm stuck

#72894

oops, nevermind. Now I see what you mean.

Works!

One last question:
How would I order them in a specific way?

I want "Regional Bailli" to be the first listing and so on...

#72903

Juan
Supporter

Timezone: Europe/Madrid (GMT+02:00)

Hi Matthew

I have been setting an example of this issue and helping Bigul with a solution for this. I think there is just a misunderstanding here.

On your first screenshot you show a definition of a select custom field wpcf-title. Every option has two associated fields: Display text and Custom field content.

On your second screenshot you show a filter for a View, that tries to filter by this custom field wpcf-title values. You seem to want to display Members that have just a few of those possible values for that wpcf-title field, right? Well, what Bigul tried to tell you is that in the filter you should not use the Display text but the Custom field content.

So in your second screenshot, the inputs should be "IN CHAR Constant 21 Constant XX", having in mind that:
* "Regional Bailli" Display text matches the "21" Custom field content
* XX should be the number you used as Custom field content for the "Vice-Chancelier Argentier" Display text.

So, to wrap up, when filtering by some values of a select custom field, you need to use the values of the Custom field content to do the filtering, not the Display text values. You do not need to change anything in the definition of the field, just in the definition of the filter query.

Hope it all makes sense.

Regards,
Juan de Paco

Le sujet ‘[Fermé] how to filter from certain values in a SELECT field’ est fermé à de nouvelles réponses.