ユーザーの情報を出力
ログインしているユーザーの名前を表示したり、ユーザーレベルによって分岐したい時。
ユーザーのログイン状態で分岐する時。
<?php global $current_user; get_currentuserinfo(); echo $current_user->user_login;//ユーザー名 echo $current_user->user_email;//E-mail echo $current_user->user_level;//権限レベル(数字) echo $current_user->user_firstname;//名 echo $current_user->user_lastname;//姓 echo $current_user->display_name;//ニックネーム echo $current_user->ID;//ユーザーID(数字) ?>
ユーザーのログイン状態で分岐する時。
<?php if($user_ID): ?> ログインしている状態で表示したい事。 <?php else: ?> ログインしてない状態で表示したい事。 <?php endif; ?>

RECENT POSTS
SEARCH