How can I show the user's ID/Name in the side bar with something like <?php the_author_ID(); ?>? Like, Welcome (user's name).
How can I show the user's ID/Name in the side bar with something like <?php the_author_ID(); ?>? Like, Welcome (user's name).
You mean like someone logged in?
<?php
setup_userdata();
echo 'Howdy '. $user_identity . $user_ID ;
// print_r($userdata); uncomment this to show whole array of userdata
?>Yes! But can I put the $user_ID in a link? Such as "/members?user=$user_ID"?
Like
'?author=' . $user_ID;
Related:
Author_Templates
wp_list_authors()
Template:Tag_Author_Tags
Like, I have a members page. There's a link /members?user=username
Can I have in a link /members?user= then your username, like <a href="/members?user=$user_ID">Your Profile</a>, and if so how?
http://www.looneylunar.com/member-directory/?user=1
If you are using a membership plugin of some sort please let us know which one you are using.
I'm using "Profiler"
Can someone please help?
I'm sorry, what more do you need?
How can I create a "Your Profile" link with Profiler? It'll take you to YOUR profile if your logged in. A universal link.
[moderated--bump removed. Please refrain from bumping as per Forum Rules]
You must log in to post.