Skip Navigation

[Resolved] How to show certain posts based on a custom field in Views?

This support ticket is created 4 years, 9 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
- 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 StanleyT8485 4 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#1543979

Tell us what you are trying to do?
I am trying to create a Related Post view. This view will show certain posts based on a custom field of where the View is placed.

Screenshot of my View filter setup - hidden link
cf-career-id is the ID of the post that I want to show.

I placed the View in a Content Template.
[wpv-view name="related-careers" related="[types field='related-careers'][/types]"]

Here is what the custom field looks like - hidden link
11-2022.00 is one of the cf-career-id I want to show for that specific post.

If I only put in one career id, the View will output a result but when I put in multiple IDs, as shown above, it will give me no result.

Stan

#1544335

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked the screenshot you shared and I see with the screenshot you shared: hidden link, that the field contains the multiple values, to separathe the field values you either need comma between each value or you should write a custom shortcode that will return the comma-separated value and then change your view's filter to hidden link to IN instead of LIKE I think this way you can resolve your issue.

#1551131

My issue is resolved now. Thank you!