使用FTP工具链接到服务器空间地址
->根目录
->wp-includes文件夹
->widgets文件夹
->class-wp-widget-meta.php
就是我们要修改的文件
打开文件后,查找"wp_register" 关键字(注意不包括引号) ,大概在50行左右,代码如下:
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout();?></li>
<li><a href="<?php echoesc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e('Entries<abbr title="Really Simple Syndication">RSS</abbr>');?></a></li>
<li><a href="<?php echoesc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php_e('Comments <abbr title="Really SimpleSyndication">RSS</abbr>'); ?></a></li>
<?php
/**
* Filter the "Powered byWordPress" text in the Meta widget.
*
* @since 3.6.0
*
* @param string $title_text Default titletext for the WordPress.org link.
*/
echo apply_filters('widget_meta_poweredby', sprintf( '<li><a href="%s"title="%s">%s</a></li>',
esc_url( __( 'https://wordpress.org/' ) ),
esc_attr__( 'Powered by WordPress,state-of-the-art semantic personal publishing platform.' ),
_x( 'WordPress.org', 'meta widget linktext' )
) );
wp_meta();
?>
</ul>
按需要删除:
1.不需要显示"登录" ,OK 删掉下面这些代码
<li><?php wp_loginout();?></li>
2.不需要显示"文章RSS" ,OK 删掉下面这些代码
<li><a href="<?phpecho esc_url( get_bloginfo( 'rss2_url' ) ); ?>"><?php _e('Entries<abbr title="Really Simple Syndication">RSS</abbr>');?></a></li>
3.不需要显示"评论RSS" ,OK 删掉下面这些代码
<li><a href="<?php echoesc_url( get_bloginfo( 'comments_rss2_url' ) ); ?>"><?php_e('Comments <abbr title="Really SimpleSyndication">RSS</abbr>'); ?></a></li>
4.不需要显示"WordPress.org" , OK 删掉下面这些代码
<?php
/**
* Filter the "Powered byWordPress" text in the Meta widget.
*
* @since 3.6.0
*
* @param string $title_text Default titletext for the WordPress.org link.
*/
echo apply_filters('widget_meta_poweredby', sprintf( '<li><a href="%s"title="%s">%s</a></li>',
esc_url( __( 'https://wordpress.org/' ) ),
esc_attr__( 'Powered by WordPress,state-of-the-art semantic personal publishing platform.' ),
_x( 'WordPress.org', 'meta widget linktext' )
) );
wp_meta();
?>
Esc
:wq
最后保存文件,替换掉服务器上的同名文件即可