Navigation überspringen

[Geschlossen] Filter child posts using parent parameter

This support ticket is created vor 3 Jahre, 4 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.

Dieses Thema enthält 1 Antwort, hat 2 Stimmen.

Zuletzt aktualisiert von Nigel vor 3 Jahre, 4 Monaten.

Author
Artikel
#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
Unterstützer

Sprachen: Englisch (English ) Spanisch (Español )

Zeitzone: Europe/London (GMT+01: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"

Das Thema „[Geschlossen] Filter child posts using parent parameter“ ist für neue Antworten geschlossen.