Dear Sir/Madam,
I prefer to use the classic editor to edit the View, do you have a website that can show how to get the parent post title and id?
I have the one-many relationship custom post "course-classes", repeatable custom field "materials" from "course", do I need to select all course, class, and materials from Content Selection when editing the View? I will show both information there.
I attach the relationship between course, class, and materials
Best regards,
Kelvin.
Hello,
q1) do you have a website that can show how to get the parent post title and id?
With classic editor, you can get the parent post information by shortcode "item" attribute, see our document:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
For post title and post ID, please check below shortcodes:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-title
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-id
If you are using Toolset Content Template, you can click button "Fields and Views", and setup the item attribute within UI, see my screenshot: post-selection.JPG
Q2) do I need to select all course, class, and materials from Content Selection when editing the View?
Within one-to-many relationship, in the single child post, you can use above shortcodes to display related parent post information directly, it does not need views.