WordPress PHP Display Author Edit Profile Link

WordPress PHP Display Author Edit Profile Link

Displays only if the user logged in is the user that is author for that post.

      //author edit profile link
      global $current_user; get_currentuserinfo();
      // var_dump($curauth);
      // echo $current_user->ID . ' = ' . $post->post_author;
      if ($current_user->ID == $post->post_author) { ?>
      <a href='<?php bloginfo(url);?>/wp-admin/profile.php'>Edit your profile</a>
      <?php } ?>

See a demo: jQuery Blog

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>