WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Avatar Reloaded
[resolved] Make avatar link to Twitter profile (2 posts)

  1. Tom
    Member
    Posted 1 year ago #

    How exactly should I use the template function get_comment_author_twitter_url($comment_id) to make the avatar link to the Twitter profile?

    My comments.php contains:

    <h2>Comments</h2>
    	<ol id="comments">
    		<?php foreach ($comments as $comment) : ?>
    
    		<li id="comment-<?php comment_ID(); ?>" class="<?php echo $altcomment; ?>">
    
    			<div class="gravatar">
    				<?php if (function_exists('get_avatar')) {
    					echo get_avatar(get_comment_author_email(),'40');
    				} ?>
    			</div>
    
    			<div class="the_comment">
    				<p><?php comment_author_link(); ?><br />
    				<span class="small-text"><?php comment_date('F d, Y'); ?></span></p>
    				<?php comment_text(); ?>
    			</div>
    
    		</li>
    
    		<?php
    			if ($altcomment == 'alt') {
    				$altcomment = '';
    			} else {
    				$altcomment = 'alt';
    			}
    		?>
    
    		<?php endforeach; ?>
    	</ol>

    http://wordpress.org/extend/plugins/twitter-avatar-reloaded/

  2. Sudar
    Member
    Plugin Author

    Posted 1 year ago #

    Inside the for loop you can call the function using the following code.

    get_comment_author_twitter_url(comment_ID())

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags