Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

how to display child posts when viewing parent post

$
0
0

Hi,
I have simple relationship:
Course – parent
Lessons – children

I want to display a list of lessons on a course page/post.

I created a view to insert inside content template, but it displays all lessons on course pages. How can I limit loop to current parent post?

This is my view:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
		
  <div class="panel panel-primary" id="toc-panel">
  <div class="panel-heading">Course Lessons</div>
  <div class="panel-body text-muted">
    This course is made up of the following lessons.
  </div>
    <div class="list-group">
      <wpv-loop><a href="[wpv-post-url]" class="list-group-item"><span class="glyphicon glyphicon-chevron-right"></span> [wpv-post-title]</a></wpv-loop>
    </div>
	</div>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		[wpml-string context="wpv-views"]<strong>No items found</strong>[/wpml-string]
	[/wpv-no-items-found]
[wpv-layout-end]

and my view settings are
http://i.imgur.com/Wlb9HM0.png

Thanks.


Viewing all articles
Browse latest Browse all 20145

Trending Articles