• Resolved designerdb

    (@designerdb)


    I’m interested in adding an “edit my profile” link to the author page of my site–but I only want it visible when a user navigates to their own author page. Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Place this code in the author template, preferably in the child theme:

    <?php
    $id = get_the_author_meta('ID');
    $logged_in = get_current_user_id();
    if($logged_in == $id) {
    	echo "<a href=\"".admin_url()."profile.php"."\">Edit your profile</a>";
    }
    ?>
    Thread Starter designerdb

    (@designerdb)

    Works perfectly!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘add visible "edit profile" link on current user's author page’ is closed to new replies.