2020年wordpress添加备案信息并删除自豪地采用wordpress
以我用的wordpress5.3.2,主题twentyseventeen为例。
cd /根目录/wp-content/themes/twentyseventeen/template-parts/footer,
footer目录下有个文件site-info.php.
改成如下:
<?php
/**
* Displays footer site info
*
* @package WordPress
* @subpackage Twenty_Seventeen
* @since Twenty Seventeen 1.0
* @version 1.0
*/
?>
<div class="site-info">
<?php
if ( function_exists( 'the_privacy_policy_link' ) ) {
the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
}
?>
<a href="<?php echo esc_url( __( 'http://beian.miit.gov.cn', 'twentyseventeen' ) ); ?>" class="imprint">
<?php
/* translators: %s: WordPress */
printf( __( '你的备案号', 'twentyseventeen' ));
?>
</a>
</div><!-- .site-info -->