WordPressのちょっと機能追加でわざわざテスト環境作るの面倒。だからライブ環境でテストする時に使える、ユーザーログインした状態の時だけ表示するようにする振り分けっ。
<?php
$current_user = wp_get_current_user();
if ( $current_user->ID != “0” ) {
echo “ログイン中”;
}
?>
これ会員制サイト、メンバーサイトとかで使えそう。
<?php
$current_user = wp_get_current_user();
if ( $current_user->ID == “0” ) {
echo “ログインして下さい。”;
} else {
echo “ログイン中”;
}
?>
via Function Reference/wp get current user « WordPress Codex