• I am wanting to add a page to my wordpress site which basically just has every comment on it, and allows people to click ‘respond’ or something. Similar to what admins see at edit-comments.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter hitmanuk2k

    (@hitmanuk2k)

    Anyone?

    I don’t think it’s possible.
    Comments don’t live of their own… every comment is attached/related to a post ID#. That’s how blogging tools work: you have an entry and comments are posted to it. NOT comments in general but related to that specific post.

    Thread Starter hitmanuk2k

    (@hitmanuk2k)

    I think it would be possible to build into a loop… but how can you make custom pages which work for the loop. I have tried making a page template and creating a blank page using said template, but that doesn’t work.

    It is possible except the ‘reply’ button. First you have create an template page and put it under your current theme folder. You can copy any template page you haved and rename its file name and template name. (the template name sits in first paragaphy of php code)

    Therefore find `<?php the_content(”); ?> ‘

    copy code under and paste.

    <?php /* SIMPLE RECENT COMMENTS PLUGIN 0.1 USED BY PERMISSION OF RAOUL https://www.raoul.shacknet.nu/ */
    function src_simple_recent_comments($src_count=3, $src_length=120, $pre_HTML=”, $post_HTML=”) {
    global $wpdb;
    $sql = “SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_date_gmt, comment_approved, comment_type,
    SUBSTRING(comment_content,1,$src_length) AS com_excerpt
    FROM wp_comments
    LEFT OUTER JOIN wp_posts ON (wp_comments.comment_post_ID = wp_posts.ID)
    WHERE comment_approved = ‘1’ AND comment_type = ” AND post_password = ”
    ORDER BY comment_date_gmt DESC
    LIMIT $src_count”;
    $comments = $wpdb->get_results($sql);
    $output = $pre_HTML;
    $output .= “\n”;
    foreach ($comments as $comment) {
    $output .= “\n\t<br>

    • <small><b>” . $comment->post_title . “</b> at ” . $comment->comment_date_gmt . ” </small><br><b>” . $comment->comment_author . “</b> : ID) . “#comment-” . $comment->comment_ID . “\” title=\”on ” . $comment->post_title . “\”>” . strip_tags($comment->com_excerpt) . “\n\t…” . “
    • “;
      }
      $output .= “\n”;
      $output .= $post_HTML;
      echo $output;
      }
      ?>

      <div class=”post-entry”>
      <ul class=”list” id=”recent-comments”>
      <?php /*FIRST NUMBER IS COMMENT COUNT TO INCLUDE. SECOND IS TOTAL CHARACTER COUNT */ src_simple_recent_comments(300, 220) ?>

      </div>
      `
      You can change the comment number to 3000 or 30000. depends. And the page will be super super long because now there is now paged function for that. (I really hope someone can improve this….sign)

      save it. and now write a page called ‘all comments’ and select the new template you just made. It should works.

      PS. sorry. it is my first time to put code here. and i don’t know how to use code function well. hope the code doesn’t get anything wrong.

    Hello, hitmanuk2k. I found the plug-in called ‘Comment Status’. It added full list of all comments by paged. However, it is in Chinese. Later I may have it to be English version. I hope this is helpful!

    https://blog.chweng.idv.tw/wordpress/comments-status

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding full list of all comments’ is closed to new replies.