• Resolved booyahc

    (@booyahc)


    Hey All,

    I am hoping you can help. Is there an easy way to load all comments on the site from all posts/categories into one page?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • `<?php include_once(‘path_to_wp/wp-load.php’);
    $comments = $wpdb->get_results(“SELECT * FROM $wpdb->comments WHERE comment_approved <> ‘spam'”);
    foreach ( $comments as $comment ) {
    // put comment loop functions here — copy from your comments template
    }
    ?>

    Thread Starter booyahc

    (@booyahc)

    Champion!

    I’ll give that a go today.

    I really appreciate your help

    Thread Starter booyahc

    (@booyahc)

    works a charm 😀

    Does this work in 2.7 as well? doesn’t seem to.

    i receive following error message:

    Warning: include_once(path_to_wp/wp-load.php) [function.include-once]: failed to open stream: No such file or directory in /home/www/brudstykker.petervagn.dk/wp-content/themes/classic/comments.php on line 79

    Warning: include_once() [function.include]: Failed opening ‘path_to_wp/wp-load.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/www/brudstykker.petervagn.dk/wp-content/themes/classic/comments.php on line 79

    In addition to an endless loop of all my comments. Any clues?

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

The topic ‘Display All Comments’ is closed to new replies.