给WordPress添加页面加载时间、查询查收、百度收录查询

%title插图%num

引见

直接把下边的代码放到要输出显示的位置即可。

WordPress如果要在网站底部显示,将代码添加到主题目录下的footer.php

%title插图%num

页面加载时间

<?php timer_stop(1); ?> //网页加载时间(秒)

页面加载次数

<?php echo get_num_queries(); ?> //网页加载查询量

百度收录数

<span id="shoulu"></span>

<script type="text/javascript">

 var url = 'https://api.uomg.com/api/entry.baidu?domain=blog.xygeng.cn';

 $.getJSON(url,function(data){

 $('#shoulu').append('百度收录: '+data.data+'条');

 });

</script>

效果如下:

%title插图%num

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容