`<?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
}
?>
Champion!
I’ll give that a go today.
I really appreciate your help
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?