Skip Navigation

[Resolved] Showing posts in 1 to many relationship in the frontpage

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 1 reply, has 1 voice.

Last updated by Roberto Miguez 1 year, 9 months ago.

Author
Posts
#2545145

The site is: hidden link

This is kind of a news magazine.

Post types:
"Posts" and "Issues" (CPT)

Relationship:
"issue-post" 1 to many.

Custom fields:
"Editorial" in "Posts"
"Frontpage" in "Issues"

I´m grouping "Posts" in "Issues". The template for every issue shows the editorial and several "Posts". The editorial is shown through a view "Editorial" with a double filter ("Posts" related to the post where the view is shown + Custom field "Editorial" is ticked). The posts under the editorial are shown through another view named "Post list" ("Posts" related to the post where the view is shown + Custom field "Editorial" is ticked).

Every issue has its page and URL an everything is showing fine.

What I need to achieve is to show the very same contens of the last "Issue" ("Post" ticked as "Editorial" + rest of "Posts" related to the same "Issue"), on the frontpage. The idea is to tick the custom field "Frontpage" to set the issue that has to be shown in the frontpage. That way, the last issue is always in the same URL and it can be referenced without the need to change the link (e.g. from a QR code).

I thought that addiing a custom field "Frontpage" to the post type "Issues" would do the job, so I set a view, but the only thing I can show is the title of the "Issue" ticked with "Frontpage". I´m not able to show the editorial and the posts related to that "Issue".

I´ve tried all kinds of combinations with item="@(postrelationship-slug).child", without success.

I´m using the legacy interface, I´ve never learnt to properly use the Blocks interface.

Thank you for your help.

#2545465

My issue is resolved now. Thank you!