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
relationship : one to many
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
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?
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.
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.
It is possible with a content template, here is a sandbox website:
Login URL: hidden link
1) Create a content template(ID 16), display a post view:
hidden 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:
hidden link
<a href="?content-template-id=16" target="_blank">Show child post </a>
See the result here:
hidden link
click link "Show child post", it will be able to display the "Parent post" using specific content template
hidden link
I see message by link: "Your sandbox has expired."
Could you please restore access to the site.
Thank you in advance
Anton
I have created another sandbox website:
Login URL: hidden link
1) Content template(ID: 13) with the child post view:
hidden link
2) Parent page:
hidden link
Display HTML link to above content template:
<a href="?content-template-id=13" target="_blank">Show child post </a>
Test it in frontend:
hidden link
Click link "Show child post"
hidden link
It works fine
For your reference.
yes, it works as required! Thank you!