Support » Plugin: Simple User Listing » User Profile Image Link

  • Resolved bffnb



    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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author 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 ); ?>

    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 😉


    Plugin Author 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 ‘User Profile Image Link’ is closed to new replies.