WordPress底部添加页面加载用时

今天来给大家说说,如何在WordPress底部,添加页面加载用时,以及加载查询量,本站已经添加了网页加载时间,如下图所示:

WordPress底部添加页面加载用时

清楚的显示网页加载所用时间为0.185秒,(怪慢的~哈哈~),下面放出代码,把下方代码放到你想显示的位置,首页底部的话就是footer.php中,其他的位置请自行寻找。

<?php timer_stop(1); ?> //网页加载时间(秒)  示例:”页面生成时间:<?php timer_stop(1); ?> 秒”

<?php echo get_num_queries(); ?> //网页加载查询量 示例:<?php echo get_num_queries(); ?> 次数据库查询

具体怎么使用,根据你的情况定吧,以上就是WordPress底部添加页面加载用时的方法,你搞定了嘛。


七彩云博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:WordPress底部添加页面加载用时

您必须 登录 才能发表评论!

(5)个小伙伴在吐槽
  1. Mens Rehab Near Me http://aaa-rehab.com Alcohol Rehab Centers Rehab Near Me Alcohol http://familymedcenter.kz/user/iviva/
    Center For Substance Abuse Prevention2020-04-01 18:01 Windows 7 | Chrome 67.0.3396.99
  2. Substance Abuse Alcohol http://aaa-rehab.com Alcohol Rehab Near Me Free Outpatient Rehab Near Me http://tyumenservices.72tv.ru/index.php?subaction=userinfo&user=drugrehabds
    Private Drug Rehab2020-04-01 02:06 Windows 7 | Chrome 67.0.3396.79
  3. Drug Alcohol Treatment http://aaa-rehab.com Alcohol Rehab Near Me Free Inpatient Rehab http://womensr.ru/user/rehabcenter/
    Samhsa Programs2020-03-31 10:04 Windows 10 | Chrome 58.0.3029.110
  4. Inpatient Drug Rehab Centers Near Me http://aaa-rehab.com Alcohol Rehab Centers Cognitive Behavioral Therapy For Substance Use Disorders http://putyla.rayon.cv.ua/user/iviva/
    Substance Abuse Services Near Me2020-03-30 17:52 Windows 10 | Chrome 58.0.3029.110
  5. Alcohol Rehabilitation Centers Near Me http://aaa-rehab.com Drug Rehab Centers Near Me http://aaa-rehab.com Best Inpatient Rehab Near Me http://aaa-rehab.com
    Substance Abuse Treatment Programs2020-03-27 11:54 Windows 7 | Chrome 67.0.3396.87