• Title says it all..

    Can we have comments template on other pages other than posts (single.php) and pages (page.php), like author (author.php)?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes you can just include it 😉

    Thread Starter Marko Jakic

    (@markzero)

    Ok here’s my code:

    $args = array(
    	'posts_per_page' => 1,
    	'author_name' => $curauth->user_nicename
    );
    $temp = $wp_query;
    $wp_query = null;
    $wp_query = new WP_Query($args);
    ?>
    <?php
    if( have_posts() ) :
    while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
    <h4><?php the_title(); ?></h4>
    <?php the_content(); ?>
    <?php endwhile; ?>
    <?php comments_template(); ?>
    <?php endif; ?>

    And I’m not getting comment template. On single.php it does appear.
    Ideas?

    Thread Starter Marko Jakic

    (@markzero)

    Sorry for bumping, but I really need to know whether is it possible ??
    Anyone?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comment Template on Author Page’ is closed to new replies.