Abend, ;)
ich habe in der letzten Zeit meine Kommentare überarbeitet und bin dabei auf folgendes Problem gestoßen. Wenn jemand bei mir eine Anwort schreibt, dann soll später hinter seinem Namen, der Name stehen, an den die Antwort geht (für eine bessere Übersicht). Ich habe leider nichts passendes dazu im Internet gefunden (auch in Englisch gesucht), daher wollte ich mal fragen wie man sowas machen könnte. Bei Youtube, in den Kommentaren, gibt so eine ähnliche Funktion auch, aber Wordpress hat anscheinend keinen fertige PHP-Tag dafür. :(
Meine Webseite: http://progames.bplaced.net/war-thunder-online
Meine Aktuelle Comment List - in der Funktions.php:
PHP
function custom_comments( $comment, $args, $depth ) {
$GLOBALS['comment'] = $comment;
switch( $comment->comment_type ) :
case 'pingback' :
case 'trackback' : ?>
<li <?php comment_class(); ?> id="comment<?php comment_ID(); ?>">
<div class="back-link">< ?php comment_author_link(); ?></div>
<?php break;
default : ?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
<article <?php comment_class(); ?> class="comment">
<div class="comment-body">
<div class="author vcard">
<?php echo get_avatar( $comment, 140 ); ?>
<div class="comment-meta">
<div class="author-name"><?php printf( __( '<a class="fn">%s</a>' ), get_comment_author_link() ); ?></div>
<time class="comment-time">
<a class="time-text">Datum:</a>
<span class="date">
<?php comment_date(); ?>
</span>
<span class="time">
- <?php comment_time(); ?>
</span>
</time>
</div>
<?php comment_text(); ?>
</div><!-- .vcard -->
</div><!-- comment-body -->
<footer class="comment-footer">
<div class="reply"><?php
comment_reply_link( array_merge( $args, array(
'reply_text' => 'Antworten',
'depth' => $depth,
'max_depth' => $args['max_depth']
) ) ); ?>
</div><!-- .reply -->
</footer><!-- .comment-footer -->
</article><!-- #comment-<?php comment_ID(); ?> -->
<?php // End the default styling of comment
break;
endswitch;
}
Alles anzeigen