wp博客底部页脚自定义代码大全

今天收到了阿里云发的短信,要求在网站上挂上备案信息号,于是又开始了一番折腾,在网上查看添加方法之后,突然觉得自己的博客底部太简洁了,多少添加点东西美化一下,于是找到了一下代码,可以自定义添加到页脚。

因为代码咱也看不懂,生怕添加完了不能用也没法撤回,所以找到了一个小方法,就是给代码添加注释代码<!--注释-->,用来备注这行代码是有什么用,如果前端显示错误我就可以精准的删除和修改了。

以下是代码: 

显示网站备案代码

<a class="czr-copyright-link" href="http://www.miitbeian.gov.cn" target="_blank"> 京ICP备17039361号 </a>
</p>

显示网站访问量

    <script async src="https://api.ly522.com/js/jilei.pure.mini.js"></script>
<span id="jilei_container_site_pv">本站总访问量<span id="jilei_value_site_pv"></span>次</span>
<span class="post-meta-divider">|</span>
<span id="jilei_container_site_uv">本站访客数<span id="jilei_value_site_uv"></span>人</span></p>

显示运行天数

<p><span id="timeDate">载入天数...</span><span id="times">载入时分秒...</span><script>// <![CDATA[
var now = new Date();
function createtime(){ var grt= new Date("7/25/2017 21:51:00");//此处修改你的建站时间或者网站上线时间
now.setTime(now.getTime()+250);
days = (now - grt ) / 1000 / 60 / 60 / 24; dnum = Math.floor(days);
hours = (now - grt ) / 1000 / 60 / 60 - (24 * dnum); hnum = Math.floor(hours);
if(String(hnum).length ==1 ){hnum = "0" + hnum;} minutes = (now - grt ) / 1000 /60 - (24 * 60 * dnum) - (60 * hnum);
mnum = Math.floor(minutes); if(String(mnum).length ==1 ){mnum = "0" + mnum;}
seconds = (now - grt ) / 1000 - (24 * 60 * 60 * dnum) - (60 * 60 * hnum) - (60 * mnum);
snum = Math.round(seconds); if(String(snum).length ==1 ){snum = "0" + snum;}
document.getElementById("timeDate").innerHTML = "本站在大风大浪中断断续续运行  "  +dnum+"天";
document.getElementById("times").innerHTML = hnum + "小时" + mnum + "分" + snum + "秒"; }
setInterval("createtime()",250);
// ]]></script>
</p>

显示查询次数

<?php get_template_part( 'template/footer-widget' ); ?>
<p style="text-align:center;color:green">查询次数 <?php echo get_num_queries();?> 次,总耗时 <?php timer_stop(1); ?> 秒。</p>
<div id="chakhsu"  style="text-align:center;color:green"></div> <script>var chakhsu = function (r) {
        function t() {
            return b[Math.floor(Math.random() * b.length)]
        }
        function e() {
            return String.fromCharCode(94 * Math.random() + 33)
        }
        function n(r) {
            for (var n = document.createDocumentFragment(), i = 0; r > i; i++) {
                var l = document.createElement("span");
                l.textContent = e(), l.style.color = t(), n.appendChild(l)
            }
            return n
        }
        function i() {
            var t = o[c.skillI];
            c.step ? c.step-- : (c.step = g, c.prefixP < l.length ? (c.prefixP >= 0 && (c.text += l[c.prefixP]), c.prefixP++) : "forward" === c.direction ? c.skillP < t.length ? (c.text += t[c.skillP], c.skillP++) : c.delay ? c.delay-- : (c.direction = "backward", c.delay = a) : c.skillP > 0 ? (c.text = c.text.slice(0, -1), c.skillP--) : (c.skillI = (c.skillI + 1) % o.length, c.direction = "forward")), r.textContent = c.text, r.appendChild(n(c.prefixP < l.length ? Math.min(s, s + c.prefixP) : Math.min(s, t.length - c.skillP))), setTimeout(i, d)
        }

只找到了这几个,网站底部最终显示效果如下,其实我也想加上网站文章总数统计和友情链接,但是没有找到方法,就折腾至此吧。

浩航 本文为原创内容
THE END
分享
二维码
< <上一篇
下一篇>>