wordpress去除wordpress.org增加登陆框

首先找到这个文件,位于/wp-includes/下的default-widgets.php

去掉wordpress.org,删除

<li><a href="http://wordpress.org/" title="<?php echo esc_attr(__('Powered by WordPress, state-of-the-art semantic personal publishing platform.')); ?>">WordPress.org</a></li>

删除RSS

<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="<?php echo esc_attr(__('The latest comments to all posts in RSS')); ?>"><?php _e('Comments <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>

 

<li><a href="<?php bloginfo('rss2_url'); ?>" title="<?php echo esc_attr(__('Syndicate this site using RSS 2.0')); ?>"><?php _e('Entries <abbr title="Really Simple Syndication">RSS</abbr>'); ?></a></li>

删除 <li><?php wp_loginout(); ?></li> 这段代码,然后改为如下代码

<li><?php if (!(current_user_can('level_0'))){ ?>
<form action="<?php echo get_option('home'); ?>/wp-login.php" method="post">
<input type="text" name="log" id="log" value="<?php echo wp_specialchars(stripslashes($user_login), 1) ?>" size="20" /><br />
<input type="password" name="pwd" id="pwd" size="20" /><br>
<label for="rememberme"><input name="rememberme" id="rememberme" type="checkbox" checked="checked" value="forever" /> 记住密码</label>
<input type="hidden" name="redirect_to" value="<?php echo $_SERVER['REQUEST_URI']; ?>" /> <input type="submit" name="submit" value="登录" class="button" />
</p>
</form>
<a href="<?php echo get_option('home'); ?>/wp-login.php?action=lostpassword">忘记密码</a>
<?php } else { ?>
<a href="<?php echo wp_logout_url( get_bloginfo('url') ); ?>" title="">退出登录</a>
<?php }?></li>

 

 

评论关闭