Skip Navigation

[Resolved] #588 Checkbox condition on term view

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)

This topic contains 2 replies, has 2 voices.

Last updated by romanB-3 1 year, 9 months ago.

Assisted by: Minesh.

Author
Posts
#2549509

Here is my custom checkboxes field with two options, with values "1" and/or "2": hidden link

Here is my code calling the view:

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

And here is my filter: hidden link

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

Languages: English (English )

Timezone: 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:
- hidden link

I've created the checkboxes field "venue phase" as you can see here:
=> hidden link

As you can see with the venue post type listing page:
=> hidden link
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":
=> hidden link

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:
=> hidden link

[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:
- hidden link

#2550223

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