WordPress.org

Ready to get started?Download WordPress

Forums

Add Author Avatar to Content.php (Gamepress Theme) (1 post)

  1. myoelectric
    Member
    Posted 1 year ago #

    I need to add this code to my php but I can't get it so it looks right:

    <? echo get_avatar( get_the_author_meta('user_email'), $size = '50'); ?>

    I would like my avatar to appear all the way on the right side of the black Title bar. I can put it in there but it jumbles the text around.

    Here is site: myoelectric.net

    and here is the content.php:

    <article id="post-<?php the_ID(); ?>" <?php post_class('list-big-thumb'); ?>>

    <div class="noimage">

    <div class="entry-date"><span class="day"><?php the_time('d'); ?></span><span class="month"><?php the_time('M'); ?></span></div>

    <div class="entry-header">
    <h2>" title="<?php the_title(); ?>" ><?php the_title(); ?></h2>

    <div class="entry-meta">
    <?php
    if ( get_post_type() == 'gamepress_reviews') :
    echo get_the_term_list( $post->ID, 'gamepress_review_category', __( 'Posted in ', 'gamepress' ),', ' );
    elseif ( get_post_type() == 'gamepress_video' ) :
    echo get_the_term_list( $post->ID, 'gamepress_video_category', __( 'Posted in ', 'gamepress' ),', ' );
    else :
    echo __( 'Posted in ', 'gamepress' ).' '. get_the_category_list( __( ', ', 'gamepress' ) ) . '';
    endif;
    ?>
    | <?php comments_popup_link( __( 'Leave a comment', 'gamepress' ), __( '1 Comment', 'gamepress' ), __( '% Comments', 'gamepress' ) ); ?>
    <?php if(get_the_title() == '') { ?>
    | " class="thepermalink" title="<?php _e( 'Permalink', 'gamepress' ); ?>"><?php _e( 'Permalink', 'gamepress' ); ?> <?php } else { ?>
    <?php } ?> </div>
    </div>
    </div>
    <div class="entry-content">
    <p>
    <?php the_content(); ?>
    </p>
    </div>
    </article>

Topic Closed

This topic has been closed to new replies.

About this Topic