Sauter la navigation

[Résolu] #588 Checkbox condition on term view

This support ticket is created Il y a 2 années et 2 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

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

Dernière mise à jour par romanB-3 Il y a 2 années et 2 mois.

Assisté par: Minesh.

Auteur
Publications
#2549509

Here is my custom checkboxes field with two options, with values "1" and/or "2": lien caché

Here is my code calling the view:

[wpv-view name="partenaires-facilitateurs" phase="2"]

And here is my filter: lien caché

So I am expecting the view to display only terms for which the wpcf-phases includes at least the checkbox "2".

But it doesn't return anything. Empty view.

Thanks.

#2550221

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I'm not sure why its not working at your end.

Here is a sandbox site and you can auto-login to it using the following link:
- lien caché

I've created the checkboxes field "venue phase" as you can see here:
=> lien caché

As you can see with the venue post type listing page:
=> lien caché
I've total three posts and out of that "Rockefeller Tower" post is set to phase 1 and posts "CD Tower" and "Platinum Palace" are set to phase 2.

I've created the following view and added the query filter to filter the venue phase custom field with shortcode attribute "phase":
=> lien caché

Select items with field:
Venue Phase is a string equal to VIEW_PARAM(phase)

Then I've added the above view to the following page with view's shortcode as given under:
=> lien caché

[wpv-view name="show-venue-phase-posts" phase="1"]

We are filtering the results with phase equal to 1 and I can see it displays the correct result on the frontend:
- lien caché

#2550223

My issue is resolved now. Thank you!
It seems the checkbox "exclude empty terms" was causing the issue...
Thanks!