Skip Navigation

[Resolved] View shortcode for classic editor

This support ticket is created 3 years, 6 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 3 years, 6 months ago.

Assisted by: Luo Yang.

Author
Posts
#2136295
Screenshot 2021-08-07 at 8.17.01 PM.png
2126069-course_classes.jpeg

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.

#2137387

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.