Comments not showing for post
-
I’m working on my first proper WP site and I’ve run in to a odd problem.
I’ve created a custom post type and also a custom page template for said type. On the page I’m showing the latest published post and also wish to show the comments for it.
custom post type name: listening.
In my file that registers my custom type I have support for comments added.
register_post_type( 'listening', array(..... 'supports' => array( 'title', 'editor', 'comments', 'revisions', 'sticky')
I aslo have in my page the following code:
$args = array( 'posts_per_page' => 1, 'post_status' => 'publish', 'post_type' => 'listening' ); query_posts($args); ..... <?php while (have_posts()) : the_post(); ?> <article id="post-<?php the_ID(); ?>" role="article"> <header class="article-header"> <h2 class="post-title"> <?php the_title(); ?> </h2> </header> <!-- end article header --> <section class="entry-content"> <?php the_content(); ?> </section> <!-- end article section --> <?php comments_template(); ?> </article> <!-- end article --> <?php endwhile; ?>
In the admin interface comments are activated on the post as well.
I can’t understand why the comments are not show. Any help is greatly apprechiated.
- The topic ‘Comments not showing for post’ is closed to new replies.