wordpress添加CNZZ统计

首先注册cnzz用户,并绑定网站域名

获取统计代码,复制代码到主题里的footer.php文件里


然后位置显示有问题



我想把图标移动到wordpress后面

首先注释footer.php里的CNZZ统计代码

然后编辑文件library/structure/footer-extensions.php

编辑后的内容如下:


function travelify_footer_info() {
echo ‘<div class=”copyright”>’;
echo ( ‘Copyright &copy;’, ‘travelify’ );
echo ‘ ‘.date(‘Y’);
echo ‘ ‘.travelify_site_link();
echo ‘. ‘.
( ‘Theme by’, ‘travelify’ );
echo ‘ ‘.travelify_colorlib_link( );
echo ‘ ‘.__( ‘Powered by’, ‘travelify’ );
echo ‘ ‘.travelify_wp_link();
echo ‘<div class=”cnzz_tj” style=”
display: inline-block;
vertical-align: middle;
margin-left: 5px;
line-height: 13px;
“>统计使用:’;
echo ‘<script type=”text/javascript”>var cnzz_protocol = ((“https:” == document.location.protocol) ? “ https://“ : “ http://“);document.write(unescape(“%3Cspan id=\’cnzz_stat_icon_1256550401\’%3E%3C/span%3E%3Cscript src=\’” + cnzz_protocol + “s4.cnzz.com/z_stat.php%3Fid%3D1256550401%26show%3Dpic\’ type=\’text/javascript\’%3E%3C/script%3E”));</script>’;
echo ‘</div>’;
echo ‘</div><!– .copyright –>’;
}

保存后刷新页面




坚持原创技术分享,您的支持将鼓励我继续创作!