Link comments to blog
-
I recently asked if it was possible to have all blogs set to ‘users must register to comment’ by default in settings/discussions which works great.
As I have done this, is it also possible to add another code in an mu-plugin that links each comment to that persons blog? So all author names (and if possible, author avatars) are linked to their blog homepage.
I have found the following code in comment-template.php if it helps, don’t know what to do with it though:
protected function html5_comment( $comment, $depth, $args ) { $tag = ( 'div' === $args['style'] ) ? 'div' : 'li'; ?> <<?php echo $tag; ?> id="comment-<?php comment_ID(); ?>" <?php comment_class( empty( $args['has_children'] ) ? '' : 'parent' ); ?>> <article id="div-comment-<?php comment_ID(); ?>" class="comment-body"> <footer class="comment-meta"> <div class="comment-author vcard"> <?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?> <?php printf( __( '%s <span class="says">says:</span>' ), sprintf( '<b class="fn">%s</b>', get_comment_author_link() ) ); ?> </div><!-- .comment-author -->
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Link comments to blog’ is closed to new replies.