Simple User Listing
[resolved] User Profile Image Link (4 posts)

  1. bffnb
    Posted 2 years ago #


    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


  2. helgatheviking
    Plugin Author

    Posted 2 years ago #

    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.

  3. bffnb
    Posted 2 years ago #

    Hi Helga!

    Thx for your help. Works fine ;)


  4. helgatheviking
    Plugin Author

    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple User Listing
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.