[Waiting for user confirmation] Access fields of unrelated posts from within a 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.

Our next available supporter will answer your ticket in about 2.52 hours from now. Thank you for your understanding.

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.

This topic contains 1 reply, has 2 voices, and was last updated by  Luo Yang 1 week ago. The support staff assigned to this topic is Luo Yang.

Viewing 2 posts - 1 through 2 (of 2 total)
Author
Posts
#578378

Hi there,

I have two unrelated post types: calendarday and record. I have a view that loops through a number of of the "calendarday" posts based on a date filter and displays them on my page. I have another view that displays posts from the type "record " that I have inserted into "Content Template for Calendarday". I want to filter the record display based on a field in the calendarday post in which the record post is being displayed. Eg the post-date.

I know that a field in a parent post type can be accessed using the id="$parent" shortcode attribute, but is there a way for a view to access a field in the post in which it appears if it is not related.

Thanks - Mark

#578415

Luo Yang
Forum moderator

Supporter languages: English (English ) Chinese (Simplified) (简体中文 )

Supporter Timezone: Asia/Hong_Kong (GMT+08:00)

Dear Mark,

In your case, you can try with "Controlling the Views filter with shortcode attributes", see our document:
https://wp-types.com/documentation/user-guides/passing-arguments-to-views/#controlling-the-filter-with-shortcode-attributes

For your reference

Viewing 2 posts - 1 through 2 (of 2 total)

You are not logged in. You can view support threads, but not post.
If you are already logged in, please refresh your browser.