Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 130709

Display children of a custom post

$
0
0

Replies: 0

I have a custom post called “Radio Show” on which I wish to display “normal” posts that are children of the custom post.

This is from the Radio Show custom post in the dashboard

I have used “classic” syntax for displaying posts from a category that are also children of the current post:

`<ul class=”podcasts”>
<?php
global $post;
$catquery = new WP_Query( ‘cat=7&posts_per_page=30&order=DESC&post_parent=’ . $post->ID );
while($catquery->have_posts()) : $catquery->the_post();?>
<li class=”track-list-item”><?php the_content();?></li>
<?php
endwhile; wp_reset_postdata();
?>
</ul>`
But it does not work. What shall I modify?

  • This topic was modified 6 minutes ago by Ajax30.
  • This topic was modified 6 minutes ago by Ajax30.
  • This topic was modified 4 minutes ago by Ajax30.

Viewing all articles
Browse latest Browse all 130709

Trending Articles