How to place comments_template(); outside the loop?
I am making a new template and I need to place the comments template outside the wordpress loop and just above the footer in the single.php file.
I searched on google and the best answered I could find related to my issue is in this link: https://stackoverflow.com/questions/6384205/displaying-the-wordpress-comments-template-outside-the-loop
However, that did not work. The same comments are appearing on all posts.
So, how can I display the comments display outsite the wp loop?
EDIT: This is the single.php file
?php
get_header(); ?
div id="primary" class="site-content"
div id="content" role="main"
?php while ( have_posts() ) : the_post(); ?
?php get_template_part( 'content-single', get_post_format() ); ?
nav class="nav-single"
h3 class="assistive-text"?php _e( 'Post navigation', 'twentytwelve' ); ?/h3
span class="nav-previous"?php previous_post_link( '%link', 'span class="meta-nav"' . _x( 'larr;', 'Previous post link', 'twentytwelve' ) . '/span %title' ); ?/span
span class="nav-next"?php next_post_link( '%link', '%title span class="meta-nav"' . _x( 'rarr;', 'Next post link', 'twentytwelve' ) . '/span' ); ?/span
/nav!-- .nav-single --
?php endwhile; // end of the loop. ?
/div!-- #content --
/div!-- #primary --
div id="secondary" class="sidebar-area" role="complementary"
?php get_sidebar(secondary); ?
?php get_sidebar(); ?
/div!-- #secondary --
?php
comments_template( '', true );
?
?php get_footer(); ?
Topic comments-template outside-wordpress loop Wordpress
Category Web