WordPress.org

Ready to get started?Download WordPress

Forums

Template Tag: the_author_image (2 posts)

  1. robertlove
    Member
    Posted 7 years ago #

    It would be great to have the option to upload an image within the Edit User interface, then have the ability to display this image within a template using (something like):

    the_author_image(before, after, width, height, alt)

    Example usage:

    <?php the_author_image('<p class=\"author\">', '<p>', 100, 100, 'John Smith'); ?>

    This would output:

    <p class=\"author\"><img alt=\"John Smith\" src=\"path/to/image.png\" width=\"100\" height=\"100\" /></p>

    This could be used to display a full-size author image on an author profile page (author.php) or thumbnails for individual posts within The Loop.

  2. Samuel B
    moderator
    Posted 7 years ago #

    Here are quite a few usage examples. Perhaps it could lead you to what you want to do.
    http://codex.wordpress.org/User:MichaelH/Testing

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags