Keiner eine Idee?
Habe hier noch einen Code-Schnipsel mit gleichem Problem:
PHP
<h2>Letzte Kommentare</h2>
<?php
$query = "SELECT * from $wpdb->comments WHERE comment_approved= '1'
ORDER BY comment_date DESC LIMIT 0 ,5";
$comments = $wpdb->get_results($query);
if ($comments) {
echo '<ul>';
foreach ($comments as $comment) {
$url = '<a href="'. get_permalink($comment->comment_post_ID).'#comment-'.$comment->comment_ID .'" title="'.$comment->comment_author .' | '.get_the_title($comment->comment_post_ID).'">';
echo '<li>';
echo $url;
echo get_avatar( $comment, $size = '25', $default ='' );
echo '</a>';
echo $url;
echo comment_excerpt();
echo '</a>';
echo '</li>';
}
echo '</ul>';
}
?>
Alles anzeigen