WordPress博客设置ICP备案

1.如图所示为设置目标:


备案图片点击下载

2.进入wordpress管理页面外观设置

2.1 2016主题

  如上图所示,左侧边栏选择外观,编辑选项。然后右侧主题文件栏目选择template-parts下面的footer部分进行文本设置。也可以登录ssh进行修改;
  准备已经设置好的链接,填入相关信息到siteinfo类中即可。

<!--本文中主题-->
<div class="site-info">
    <?php
    if ( function_exists( 'the_privacy_policy_link' ) ) {
        the_privacy_policy_link( '', '<span role="separator" aria-hidden="true"></span>' );
    }
    ?>
    <div style="width:300px;margin:0 auto; padding:20px 0;">
    <a target="_blank"  style="display:inline-block;text-decoration:none;height:20px;line-height:20px;"><img src="<?php echo esc_url( home_url( 'wordpress/beian_logo.png' ) ); ?>" style="float:left;"/><p style="float:left;height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">京公网安备 12345678901234号</p></a>  
    <a style="text-decoration:none;height:20px;" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12345678901234"><p style="height:20px;line-height:20px;margin: 0px 0px 0px 5px; color:#939393;">京ICP备12345678号-2</p></a>
</div>  

<!--读者网站主题可添加如下,备案号根据自己修改-->
<img src="wordpress/beian_logo.png" />
<a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=12345678901234">京公网安备 12345678901234号
</a><p>京ICP备12345678号-2</p>

2.2 2020主题

  不同主题可能也为布局原因不同,所以修改的文件不同,需要自己探索,例如footer-menus-widgets.php等等。

  在2020主题中,/usr/share/nginx/html/wordpress/wp-content/languages/themes/twentytwenty-zh_CN.po文件中写有页脚文字“由WordPress强力驱动”,可自定义修改。
如果用于添加ICP备案等信息,可以再如下图footer.php中修改。

最终如下图所示

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值