Tagged: comments, shortcode, template Viewing 2 posts - 1 through 2 (of 2 total) Author Posts March 11, 2013 at 10:34 am #21118 lavillenueParticipant Hello, I am having trouble making a unique page template for my website. I want to have a parent page show all the number of comments on each of its child pages. This is the current state of my page: http://www.lavillenue.fr/collaborer I want to have it show the number of comments on *other* pages. Like this: http://i.imgur.com/eOvEauq.jpg So each of those numbers will be the numbers of comments on http://www.lavillenue.fr/collaborer/bars http://www.lavillenue.fr/collaborer/architecture http://www.lavillenue.fr/collaborer/magasins etc… Is that even possible? I know this code exists get_comments_number(), but I am not sure what I should write in between the parenthesis for it to show the number of comments on other pages. And lastly, could I do this with a shortcode? I find them to be very useful and easy to use. March 11, 2013 at 4:23 pm #110508 DevinModerator Hi lavillenue, Check out the codex page on get_comments_number: http://codex.wordpress.org/Template_Tags/get_comments_number and just comments_number: http://codex.wordpress.org/comments_number The code needs to be inside a loop but yes it should be possible. Regards, Devin Author Posts Viewing 2 posts - 1 through 2 (of 2 total) The topic ‘Page template with number of comments in other pages’ is closed to new replies.