Skip Navigation

[Closed] Filter child posts using parent parameter

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

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 3 years ago.

Author
Posts
#2298631
Screenshot 2022-02-21 at 6.00.42 PM.png
Screenshot 2022-02-21 at 5.40.02 PM.png
Screenshot 2022-02-21 at 5.40.30 PM.png

Dear Sir/Madam,

I want to view all child posts related to a specific parent post.

I make two views, I put the parent view into page and passing the url parameter "pid", below is the view code in parent view

		<wpv-loop>
          [wpv-conditional if="('[wpv-search-term param="pid"]' ne '')"]
          會員:[types field='member-chinese-name'][/types] ([wpv-post-id])
          [wpv-view name="application-list-child-posts"]
          [/wpv-conditional]
		</wpv-loop>

From child view, I set "Select posts in Any relationship that are related to the Post where this View is shown." in Query Filter but it doesn't work, please help.

You can find the relationship between Member and Application from the screenshot.

#2299603

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

You don't want to show posts that are the children of the post where the View is shown (i.e. the current page), you want to show posts that are children of the current post from the outer View listing parents.

So the correct filter option is "The current post in the loop"

The topic ‘[Closed] Filter child posts using parent parameter’ is closed to new replies.