WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
Show Author Avatar in PostsI (3 posts)

  1. Michael
    Member
    Posted 9 months ago #

    Hi guys,
    How do I show the author's avatar in posts for customizr?

  2. Ultimate Peter
    Member
    Posted 9 months ago #

    ditto

  3. acub
    Member
    Posted 9 months ago #

    The function you're after is get_avatar. Depending on where you want it to show up, you should add something like this:

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

    to the output of some element in your post template, where 50 is the size of the avatar image in pixels (feel free to change it).

    Normally you should add this using an action hook in functions.php of your child theme, not by modding your post template. This way your modification will not be affected by future theme updates.

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.