WordPress.org

Support

Support » Plugins and Hacks » Simple User Listing » [Resolved] User Profile Image Link

[Resolved] User Profile Image Link

  • Hi!

    Is it possible to help me out. I will link the User image

    <?php echo get_avatar( $user->ID, 90 ); ?>

    to the same link as it is at the h2 heading

    <h2><a target="_blank" href="<?php echo get_author_posts_url($user->ID); ?>">.....

    So if somebody clicks on the image it also get directed to the same url as the h2 heading (User Name). My own coding experiments to put the code together fail 🙂

    Thank you

    http://wordpress.org/plugins/simple-user-listing/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author helgatheviking

    @helgatheviking

    Just wrap the link around the image. In theory:

    <a target="_blank" href="<?php echo get_author_posts_url($user->ID); ?>">
    <?php echo get_avatar( $user->ID, 90 ); ?>
    </a>

    Note, that’s not tested, my computer is borked at the moment, and I can’t get into helping you customize your theme html, so that’s the best I can do. Hope it points you in the right direction at least.

    Hi Helga!

    Thx for your help. Works fine 😉

    best

    Plugin Author helgatheviking

    @helgatheviking

    Well good. Just to be clear this should be in your theme’s version of the template as described on the main plugin page.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Resolved] User Profile Image Link’ is closed to new replies.
Skip to toolbar