I would like to display a button "Edit Profile" if a user that is logged in is looking to it's own author.php (user profile).
I would like to display a button "Edit Profile" if a user that is logged in is looking to it's own author.php (user profile).
You might need to add a if is logged in. But I am pretty sure that is built in. This will only work on the profile page I THINK.
<?php
global $current_user;
get_currentuserinfo();
if ($current_user->ID == $curauth->ID) {
echo "<a href='http://iknowtheledge.com/wp-admin/profile.php'>Edit Profile</a>";
}
?>
adding this to tipsforwordpress.com
Thanks, I changed it a little bit :)
<?php
global $current_user; get_currentuserinfo();
if ($current_user->ID == $curauth->ID) { ?>
<a href='<?php bloginfo(url);?>/wp-admin/profile.php'>
<img src="<?php bloginfo('template_url'); ?>/img/editbutton.jpg"></a>
<?php } ?>This topic has been closed to new replies.