wp_get_current_user

スポンサーリンク
WordPress

[WP]functions.phpでログインユーザーの条件分岐

ユーザーIDで条件分岐 $user = wp_get_current_user(); //ユーザーID2以外の場合 if( $user-> get('ID') !== "2") { } ユーザー名で条件分岐 $user = wp_get_c...
WordPress

[WP]ユーザー別に管理画面左メニューの表示/非表示を制御する方法

functions.php function remove_menus () { $user = wp_get_current_user(); //ユーザーID「2」以外の場合 if( $user-> get('ID') !== "2") ...
スポンサーリンク