WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Display pertinent comments under each post (5 posts)

  1. idahofallzcom
    Member
    Posted 8 years ago #

    At http://idahofallz.com we are trying to create a more 'conversational' interface.

    We've got the 'recent comments' script, but people have said it does them little good since the comments are out of context from the original posts.

    Obviously comments pertinent to a particular post appear on a post's page.

    How does one make comments appear on the front page (in The Loop) immediately below each post?

    Better yet, how does one make comment excerpts (which are each linked to the full comment on the dedicated post page) appear on the front page immediately below each post?

    So visitors would see:

    Post (blah blah blah)

    Comments made about this post:
    * Comment 1 (blah blah blah ...)
    * Comment 2 (blah blah blah ...)
    * Comment 3 (blah blah blah ...)

    In this way, we can skim the reactions to posts without having to go to each page to see all the comments (which does not happen all that often).

    I have tried several searches over several weeks now in the codex, support forums, across the web. It seems so obvious a design that I am sure someone has done this, but I keep getting nothing in my searches.

  2. idahofallzcom
    Member
    Posted 8 years ago #

    Actually one better would be to have the commenter's name appear also:

    Post (blah blah blah)

    Comments made about this post:
    * John said: (blah blah blah ...)
    * Jane said: (blah blah blah ...)
    * Jerk said: (blah blah blah ...)

  3. idahofallzcom
    Member
    Posted 8 years ago #

    In doing yet more research (I really want this functionality), I found Eric Meyer's plugin, mw comments, at:
    http://www.meyerweb.com/eric/tools/wordpress/mw_comments_trackbacks.html

    I'm sure it's great and I'm wrong somehow, but it kept failing me. But isn't Eric's suggested php syntax wrong here?

    <?php function mw_comments('param') ?>

    Shouldn't it actually be:
    <?php function mw_comments('param'); ?>

    And if I don't want any parameter changes:
    <?php function mw_comments(); ?>

    But none of these worked, including:
    <?php mw_comments(); ?>

    So then I found someone else who used Meyer's plugin but hacked it out more:
    http://wordpress.org/support/topic/32818?replies=3#post-218249

    Their solution is:
    <?php
    $comments = mw_comments();
    include(TEMPLATEPATH . '/comments.php'); // Display comments
    ?>

    Now my comments show under each post that they are in response to. You can see this under each post all over the main page, and to see a non-post-specific page that also shows how comments appear:
    http://idahofallz.com/category/politics/

    Alas, the only two things I want to tweak further are:

    1) Make the comment box disappear (that's what the 'Make a comment' link is for)

    2) Make the comments appear as linked excerpts, and clicking the link takes you to the full comment on the dedicated post page. This way readers can scan the comments and choose which they want to read.

  4. cheesemasterdan
    Member
    Posted 8 years ago #

    Do you not need a cut down version of your comments.php file (obviously not called comments.php) which you use in the include function??

  5. idahofallzcom
    Member
    Posted 8 years ago #

    Ahhh, there you go. Save comments.php as another file (like comments_custom.php), cut out what I don't need, and reference that.

    Although in the time since I last posted, I realized that having the full comments and the comment box appear under each post probably works better to achieve the ideal of local 'conversation'. I can see by removing the extra click of having to go to the page with the comment box, that more visitors may be inclined to comment if the box is right there.

    To save my main page space, I did cut down the comment box from 10 lines to 2, and I plan to make the comments a smaller text. Just need to work on the CSS here.

    Thanks for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic