WordPress.org

Ready to get started?Download WordPress

Forums

Replacing the comment author link with the author profile link in twenty ten (1 post)

  1. webtomap
    Member
    Posted 1 year ago #

    Hey everyone!

    I'm having a problem with the comment author link. I want the author link to point to the profile page. I am using the twenty-ten theme.

    This is the code in the twenty ten theme that creates the comment:

    <li <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>">
    		<div id="comment-<?php comment_ID(); ?>">
    		<div class="comment-author vcard">
    			<?php echo get_avatar( $comment, 40 ); ?>
    			<?php printf( __( '%s <span class="says">says:</span>', 'twentyten' ), sprintf( '<cite class="fn">%s</cite>', get_comment_author_link() ) ); ?>
    		</div><!-- .comment-author .vcard -->
    		<?php if ( $comment->comment_approved == '0' ) : ?>
    			<em class="comment-awaiting-moderation"><?php _e( 'Your comment is awaiting moderation.', 'twentyten' ); ?></em>
    			<br />
    		<?php endif; ?>
    
    		<div class="comment-meta commentmetadata"><a href="<?php echo esc_url( get_comment_link( $comment->comment_ID ) ); ?>">
    			<?php
    				/* translators: 1: date, 2: time */
    				printf( __( '%1$s at %2$s', 'twentyten' ), get_comment_date(),  get_comment_time() ); ?></a><?php edit_comment_link( __( '(Edit)', 'twentyten' ), ' ' );
    			?>
    		</div><!-- .comment-meta .commentmetadata -->
    
    		<div class="comment-body"><?php comment_text(); ?></div>
    
    		<div class="reply">
    			<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    		</div><!-- .reply -->
    	</div><!-- #comment-##  -->
    
    	<?php

    Have found these solutions:

    http://wordpress.org/support/topic/link-to-user-profile-in-their-comment?replies=8

    But did not work for me.

    And have found this solution

    This works to some extend. The links do point to the profile pages but all comments are now anonymous.

    Hope someone can help!

    Regards

    Niels

Topic Closed

This topic has been closed to new replies.

About this Topic