Skip Navigation

[Resolved] Custom field “in” filter with shortcode attribute parameter not working

This thread is resolved. Here is a description of the problem and solution.

Problem:

Customer mentioned that the "IN" comparison is not working for their view custom filter

Solution:

This setting is actually working. The problem was that the user was filtering for a field on a post type that doesn't have that custom field.

This support ticket is created 6 years, 3 months ago. 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)

This topic contains 3 replies, has 2 voices.

Last updated by vimalS 6 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#1115501
Screenshot_1.png
Screenshot_4.png
Screenshot_5.png
Screenshot_6.png
Screenshot_8.png

I am trying to display case studies from the custom field(case study id) with allow multiple values added on home page.
I have created view to display case studies for the added 2 ids on home page

Link to a page where the issue can be seen:hidden link

I expected to see: 2 case studies

Instead, I got: no results found

Please check attached screen shots for the same.

#1115827

Shane
Supporter

Languages: English (English )

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

Hi Vimal,

Thank you for contacting our support forum.

I think there might be a plugin conflict here that is blocking the view query.

I checked the debug data for view and noticed that IN is not being added to the sql query for the view.

Could you temporarily disable all the non-toolset plugins and try again? However I suspect that this plugin might be the cause Intuitive Custom Post Order

Thanks,
Shane

#1115831

Shane
Supporter

Languages: English (English )

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

Hi Vimal,

It seems the actual issue is that the issue is that you were filtering for the custom field case-id instead of the post id for the cases.

I changed the filter to the post id so it should start working now.

Thanks,
Shane

#1116392

My issue is resolved now. Thank you!