Navigation überspringen

[Gelöst] how to make a link on parent post page to separate page with child posts

This support ticket is created vor 1 Jahr, 11 Monaten. 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)

Dieses Thema enthält 9 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von antonK-2 vor 1 Jahr, 11 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#2609833

Tell us what you are trying to do?

Please advise how to create link/button on parent post page which will pass to separate page with child posts.

Thank you
Anton

#2609837

relationship : one to many

#2609989

Hello,

In the single parent post, you can display a post view:
- Query posts of child post type
- Filter by post type relationship of your "one to many" relationship
- Enable pagination, display one item each page
- In view's loop, display child post information

And you can use CSS codes to style the pagination link/button as what you want.

More help:
https://toolset.com/course-lesson/displaying-related-posts/#displaying-many-related-items

#2610067

thank you. Understand this.

I have several different views which display child posts. It's required to display all of them not on parent post but on separate page. And have a link on the page from parent post. Is it possible?

#2610089

Your questions are not clear.
What link do you want to display in the single parent post?
What link do you want to display in the single child post?

Please provide more details before we proceed.

#2610197

We have:

1. PARENT POST PAGE
2. PAGE WITH CHILD POSTS

RELATIONSHIP: one to many

On #2 page there are several Views with child posts. And other content.

REQUIRED
Place a link on 1. PARENT POST PAGE which will pass to 2. PAGE WITH CHILD POSTS

It should be dynamic as we have a lot of parent post pages which should have respective links to pages with child posts.

#2610333

It is possible with a content template, here is a sandbox website:
Login URL: versteckter Link

1) Create a content template(ID 16), display a post view:
versteckter Link
- Query posts of child post type
- Filter by post type relationship of your "one to many" relationship
- In view's loop, display child post information

2) In single parent post, display a HTML link, and pass above content template ID as URL parameter:
versteckter Link

<a href="?content-template-id=16" target="_blank">Show child post </a>

See the result here:
versteckter Link
click link "Show child post", it will be able to display the "Parent post" using specific content template
versteckter Link

#2613207

I see message by link: "Your sandbox has expired."

Could you please restore access to the site.

Thank you in advance
Anton

#2613685

I have created another sandbox website:
Login URL: versteckter Link

1) Content template(ID: 13) with the child post view:
versteckter Link

2) Parent page:
versteckter Link
Display HTML link to above content template:

<a href="?content-template-id=13" target="_blank">Show child post </a>

Test it in frontend:
versteckter Link
Click link "Show child post"
versteckter Link
It works fine

For your reference.

#2613957

yes, it works as required! Thank you!