Skip Navigation

[Resolved] sibling in view

This support ticket is created 3 years, 9 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.

Our next available supporter will start replying to tickets in about 1.01 hours from now. Thank you for your understanding.

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/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 3 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1661201

Tell us what you are trying to do? display sibling of parent through child ID

Is there any documentation that you are following? no

Is there a similar example that we can see? no

What is the link to your site? hidden link
the relationships are
one >many: projects>tasks
and
one>many projects>worksample

my view displays all tasks into a table, and displays the parent by pulling @project-task.parent
how do i pull the worksample related to the project?

#1662689

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

To display "worksample" posts related to a "project" post, you'll need a new post view, with post-relationship filter:

1. Please create a new view and set it to show "worksample" posts.

2. In the "Query Filter" section, you'll add a post-relationship filter for the "projects>worksample" relationship and for the related item source select the option "The post with ID set by the shortcode attribute: wpvrelatedto".
( example screenshot: hidden link )

3. You'll need the target "project" post's ID which can be acquired using the item attribute in "wpv-post-id" shortcode:


[wpv-post-id item='@project-task.parent']

4. The last step would be passing this project ID in your newly created view's shortcode, where you'd like to display these related "worksample" posts:


[wpv-view name="view-name" wpvrelatedto="[wpv-post-id item='@project-task.parent']"]

Note: you'll replace "view-name" with this newly created view's name or slug.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.