WordPress.org

Ready to get started?Download WordPress

Forums

Comments not showing in special Page Template (2 posts)

  1. pkiula
    Member
    Posted 1 year ago #

    Hi. I have a special page template. Some pages are assigned to this template.

    The code, basically, is like this:

    <?php
    /*
    Template Name: My Own Page
    */
    ?>
    
    <?php get_header(); ?>
    
      <div>
        <?php if (have_posts()) : while (have_posts()) : the_post();?>
            <?php the_content(); ?>
            <br/><br/>
            <?php comments_template(); ?>
        <?php endwhile; endif; ?>
      </div>
    
    <?php get_footer(); ?>

    The comments section is not showing up for this.

    Any ideas? Somewhere on this forum is a suggestion that I need to call my own query_post function before the loop, but for a page, what query_post is needed?

    Appreciate any pointers. Thanks!

  2. petertellgren
    Member
    Posted 1 year ago #

    I'm having the very same problem, did you find a solution to this?

Topic Closed

This topic has been closed to new replies.

About this Topic