Title: View only comments per post.
Last modified: August 18, 2016

---

# View only comments per post.

 *  Resolved [ssdesign](https://wordpress.org/support/users/ssdesign/)
 * (@ssdesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/)
 * Hi,
    I am developing a custom theme and heavily customising the feel of the blog.
 * I am stuck at one place, when a user clicks the comments link, I want to display
   only comments (without the actual post content).
 * If I am not wrong, the comments page uses the POST template file to render itself
   by adding:
    #comments to the link URL.
 * Is it possible to create a custom template for comments page using this code?
 * <?php comments_template(); ?>
 * I am confused…..
 * Any help?

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [nearlythere](https://wordpress.org/support/users/nearlythere/)
 * (@nearlythere)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275302)
 * you can find that included file called “comments.php” … in your theme folder
 * the default CSS is also loaded with custom classes for displaying comments.
 * bon chance!
 *  Thread Starter [ssdesign](https://wordpress.org/support/users/ssdesign/)
 * (@ssdesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275393)
 * Yes that was the first thing i thought of.
    BUT When I look at the URL of comments
   on the index page, it says something like this: [http://www.myWebsite.com/?p=82#comments](http://www.myWebsite.com/?p=82#comments)
 * Which means that by default, the comments link calls the INDEX.PHP file and adds:
   ?
   p=82#comments to it.
 * If I were to call a custom comments page, what should the comment URL look like?
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275394)
 * If exists WP uses the single.php template file to display a single post (aka “
   comment page”) + the comments.php template is called in.
    If there is no single.
   php file ==> the index.php will be used. see [Template_Hierarchy](http://codex.wordpress.org/Template_Hierarchy)
   Based on this you can create a “single” template that won’t show the content,
   just calls the comments. Warning: this is just an “educated guess” 🙂 – but I’d
   give it a try.
 *  Thread Starter [ssdesign](https://wordpress.org/support/users/ssdesign/)
 * (@ssdesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275403)
 * Excellent,
    I solved it.
 * Now my single.php looks like this:
 * <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php comments_template();?
   > <?php endwhile; else: ?> <?php endif; ?>
 * Thats it.
    Cool…
 *  [moshu](https://wordpress.org/support/users/moshu/)
 * (@moshu)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275405)
 * Glad it worked. Can you, please, mark this topic as “solved”?
 *  Thread Starter [ssdesign](https://wordpress.org/support/users/ssdesign/)
 * (@ssdesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275417)
 * oops… not solved yet 🙂
 * I do get a comments page with just the comments
    BUT
 * Now the post content is removed from the Archive pages as well… because it looks
   like comments and archive both use single.php
 * Any idea how to tackle this one??
 *  Thread Starter [ssdesign](https://wordpress.org/support/users/ssdesign/)
 * (@ssdesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275418)
 * Sorry I mean POST PERMALINK and not ARCHIVE
 *  [nearlythere](https://wordpress.org/support/users/nearlythere/)
 * (@nearlythere)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275480)
 * ssdesign… hmmm… i think there’s a conceptual block here.
 * i see now that you thought the #comments was part of a URL query string telling
   the script to render comments. and that is why you were asking “what should the
   URL look like”
 * in fact, a # indicates an “anchor”. it’s just a basic HTML tag to move ‘within’
   a page, like halfway down, where the comments are. so in that sense it is not
   processed by PHP. see for example, how this page ‘loads’ to the middle:
    [http://codex.wordpress.org/Blog_Design_and_Layout#Themes_and_Templates](http://codex.wordpress.org/Blog_Design_and_Layout#Themes_and_Templates)
 * i hope that is clear…
 * so now i am confused. i re-read all of your questions here. i guess i don’t understand
   what you want in the end… you want a page of just all comments? there’s a plugin
   for comments:
 * have a look at some of these here:
    [http://codex.wordpress.org/Plugins/Comments](http://codex.wordpress.org/Plugins/Comments)
 *  [Valerie](https://wordpress.org/support/users/valerie/)
 * (@valerie)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275489)
 * Is using the built in [comments popup script](http://codex.wordpress.org/Template_Tags/comments_popup_script)
   and [comments popup link](http://codex.wordpress.org/Template_Tags/comments_popup_link)
   tags an option for you? It would then keep the comments separate from your posts–
   once you change your single.php (permalink page which is usually used for showing
   comments) appropriately.
 *  Thread Starter [ssdesign](https://wordpress.org/support/users/ssdesign/)
 * (@ssdesign)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275499)
 * ok guys, sorry if I confused you all.
 * I have recently shifted to WP and liked it so much that I went ahead and started
   developing a complete FLASH version of it.
 * Now about this question, I tried what Valerie has already suggested, I modified
   the core include files and this is what I did:
 * changes:
    echo $home . ‘/’ . $wpcommentspopupfile.’?p=’.$id.’#comments’;
 * to;
    echo $home . ‘/’ . $wpcommentspopupfile.’?comments_popup=’.$id;
 * Then I modified the comments-popup.php in my theme folder to output a custom 
   XML and there you go….
 * Thanks again to everyone for flushing this out 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘View only comments per post.’ is closed to new replies.

## Tags

 * [only](https://wordpress.org/support/topic-tag/only/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 4 participants
 * Last reply from: [ssdesign](https://wordpress.org/support/users/ssdesign/)
 * Last activity: [20 years, 7 months ago](https://wordpress.org/support/topic/view-only-comments-per-post/#post-275499)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
