How to Show WordPress Comments on New Page

By 2 years ago   BloggingTutorialsWordPress
Tweet Share Email Share  

Do you want to display WordPress comments on a new page and separate from post content? I explained earlier how to install WordPress pop-up comments easily. Now try this tip which will open WordPress comments on a different page, and not a pop-up window.

This code works as a custom modification of the WordPress pop-up comments script and link code. We switched to this new comment system on our site in the last week and have been tweaking it. We now have new comments pages for every post. See this example comments page below –

new comments page

Here is how to do it for your site –

1. Remove old comment system

Firstly you need to remove your original comment system from the single.php post page. This is essential to avoid reduplication of comments on both pages. This will typically look like this code.

<?php comments_template('', true); ?>

2. New Comments Link

Next you need to install a link, which when clicked will lead you to the new comment system page. Here is how we have installed the code on our website.

<a href="<?php the_ID(); ?>" 
class="btn btn-primary">
<?php comments_number('No Comments', '1 Comment', '% Comments'); ?></a>

Here again we use the post ID to get the post. Then we use btn Classes using bootstrap to create a beautiful blue button. The link has three-part variables which will display when there are no comments, one comment, or many comments . You can choose to edit these three variables to show whatever content you like when these three comment situations are present. We prefer to add a post comment text also along with this link.

3. New Comments Page

Then you need to create a new file which will host all comments for the particular post. Here again you need to create new PHP file without FTP in your themes folder directly from WordPress admin. Since this is a blank php file, you need to source comments system from the comments-popup.php .

This is the same file which was used to source content for the pop-up comments page. This file is typically located in /wp-includes/theme-compat/comments-popup.php. You can also find the source code for this file on the Github.

So we have basically tweaked the WordPress popup comment system, and used it as new pages on your website. Now your WordPress comments are on a different page, and separate from a post content and you can style and edit this file as per your WordPress theme provides seamless integration with your site.

You can see this particular comment system live on our blog right now. Post a comment and see.

Also Read – why this helpful to remove user generated content from Google index and fix Google Panda penalties.

8 comments on “How to Show WordPress Comments on New Page

  1. astermen234 says:

    Normally with a tool like wordpress or otherwise… you have comments on your blog. Well I happen to know it’s possible to have comments on other pages that are built within WordPress.

    However I’ve googled it, I asked (never got a reply) WordPress forums and searched their site and I couldn’t find anything… but I’ve seen it (I forget the site I saw it on!!) and I wondered whether anyone could help me out?

    Someone who I asked said I need to call the comments page but i don’t know how to do that. Help?

  2. Prateek says:

    I have tried this before but it always opened a pop-up window. I am surely try it this way and BTW this looks great..

  3. Raj says:

    How about appending the URL to You can drop blog post ID in the URL. Find the idea here:

  4. surbhi says:

    Your article made the steps so easy to follow. Thanks for the guidance and reducing the effort.

  5. Utsav says:

    yeah really awesome tip.
    Thanks for sharing.
    I am applying this on my blog.

  6. Roman says:

    Awesome look.You also use it on the website

  7. azokatheo says:

    its a really great tips. let me give it a test

  8. Fabi says:

    This is what I have been looking for. Thanks a lot. it works perfectly!

Leave a Reply

Your email address will not be published. Required fields are marked *

ALL comments are moderated. No links allowed. Use real name. Only useful comments will be approved.