• Anonymous User 357386

    (@anonymized-357386)


    How i can add author profile image also for comments?
    i’ve already fixed in page:

    /* Show the post author's gravatar if enabled */
    								if (get_option('graphene_show_post_avatar') && !is_page()) {
    									if (get_the_author_meta('graphene_author_imgurl')) {
    									echo '<img class="avatar" src="'.get_the_author_meta('graphene_author_imgurl').'" alt="" style="height: 38px" />';
    									} else {
    									echo get_avatar(get_the_author_meta('user_email'), 38);
    									}
    								}

    and bottom of article:

    /**
    			 * Display the post author's bio in single-post page if enabled
    			*/
    			if (is_single() && get_option('graphene_show_post_author')) :
    			?>
                <h4 class="author_h4"><?php _e('About the author', 'graphene'); ?></h4>
                <div class="author clearfix">
                	<?php
    				if (get_the_author_meta('graphene_author_imgurl')) {
    				echo '<img class="avatar" src="'.get_the_author_meta('graphene_author_imgurl').'" alt="" style="width: 100px" />';
    				} else {
    				echo get_avatar(get_the_author_meta('user_email'), 100);
    				}
    				?>

    But for comments is really different and i don’t have found a valid way to fix it: function.php

    <?php echo get_avatar($comment, apply_filters('graphene_gravatar_size', 40)); ?>
                    <?php do_action('graphene_comment_gravatar'); ?>

    Any help is more appreciated 🙂

  • The topic ‘Author profile image URL also in comment?’ is closed to new replies.