WordPress怎么去除wordpress.org链接

我们安装好 wordpress 程序,此时看到功能表栏有一个wordpress.org链接,可参考以下步骤删除:

1、打开WordPress的安装目录,找到路径wp-includes/widgets下的class-wp-widget-meta.php文件

2、修改class-wp-widget-meta.php里的代码:

<?php

/**

* Filter the “Powered by WordPress” text in the Meta widget.

*

* @since 3.6.0

*

* @param string $title_text Default title text 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 link text’ )

) );

 

wp_meta();

?>

将代码替换为:(前加<!–,后加–>,注释代码)

<!–<?php

/**

* Filter the “Powered by WordPress” text in the Meta widget.

*

* @since 3.6.0

*

* @param string $title_text Default title text 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 link text’ )

) );

 

wp_meta();

?>

–>

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注