WordPress 技巧:侧边栏登录窗口
有没有想过不用跑到登录界面,直接在首页就能登录到 WordPress 呢?先帖几张屏幕截图,是在本站使用的 BLIX 主题下测试的效果:
登录窗口:
登录之后:
详细代码如下:
<li>
<h2>Control panel</h2>
<ul>
<li>Identified as <strong></strong>.
<ul>
<li><a href="/wp-admin/">Dashboard</a></li>
= 1 ) : ?>
<li><a href="/wp-admin/post-new.php">Write an article</a></li>
= 1 ?>
<li><a href="/wp-admin/profile.php">Profile and personal options</a></li>
<li><a href="/wp-login.php?action=logout&redirect_to=">Exit</a></li>
</ul>
</li>
</ul>
<h2>Identification</h2>
<ul>
<li>
<form action="/wp-login.php" method="post">
<label for="log"><input type="text" name="log" id="log" value="" size="22" /> User</label>
<label for="pwd"> Password</label>
<label for="rememberme"> Remember me</label>
<input type="hidden" name="redirect_to" value=""/>
</li>
<li><a href="/wp-register.php">Register</a></li>
<li><a href="/wp-login.php?action=lostpassword">Recover password</a></li>
</ul>
</li>