https://diaryofchanel.com/discuss is the page I am referring to.
That particular page has subpages. So far I only have 2 listed like this
1. domestic violence
2. abortion
Ideally, i would like to show on my Discuss page, how many comments each SUBPAGE/TOPIC has. ie:
1. domestic violence (18 comments)
2. abortion (32 comments)
Here is how I have the Discuss page coded, with it’s own template:
<?php
/*
Template Name: Discussions
*/
?>
<?php get_header(); ?>
<div id=”side-left”>
<div id=”content”>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”kutu”>
<div class=”ust”><span></span></div>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h2 class=”pagetitle”><?php the_title(); ?></h2>
This section is an open forum for viewers to discuss & debate random topics per week. I will be posting “The Topic Of The Week” as it will allow us to converse about highlights of the media, politics, celebrity gossip, life & relationships, and parenting. Topics are posted in a numerical order (the highest number being the most recent topic) For those that are subscribed, you will receive an email notification when the new topic is posted! So if you’re interested in being involved, please subscribe to my mailing list. Thank you.
<div class=”entrytext”>
<?php
if($post->post_parent)
$children = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
else
$children = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
if ($children) { ?>
<?php } ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link(‘Edit this entry.’, ‘<p style=”margin:10px;”>’, ‘</p>’); ?>
<br class=”clear” />
<div class=”alt”><span></span></div></div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>