[转载]wordpress网站信息代码

一、文章总数

<?php
	$count_posts = wp_count_posts();
	echo '文章总数:' . $published_posts = $count_posts->publish;
?>

二、评论总数

<?php
	$numcomms = $wpdb->get_var("SELECT COUNT(*)FROM $wpdb->comments WHERE comment_approved = '1'");
	if(0<$numcomms)
		$numcomms=number_format($numcomms);
	echo "评论总数:".$numcomms;
?>

三、链接总数

<?php
	$link = $wpdb->get_var("SELECT COUNT(*)FROM $wpdb->links WHERE link_visible='Y'");
	if(0<$link)
		echo "链接总数:".$link;
?>

四、页面总数

<?php
	$count_pages = wp_count_posts('page');
	echo '页面总数:' . $pages_posts = $count_pages->publish;
?>

五、分类总数

<?php
	echo '分类总数:' . $count_categories = wp_count_terms('category');
?>

六、标签总数

<?php
	echo '标签总数:' . $count_tags = wp_count_terms('post_tag');
?>

七、查询次数

<?php echo '查询次数:' . get_num_queries(); ?>

八、载入时间

载入时间:<?php timer_stop(1); ?>

九、网站运行时间

<?php echo '运行时间:' . floor((time()-strtotime("2010-10-10"))/86400); ?>

十、最后更新时间

<?php $last = $wpdb->get_results("SELECT MAX(post_modified) AS MAX_m FROM $wpdb->posts WHERE(post_type='post' OR post_type='page') AND (post_status='publish' OR post_status='private')");
	$last = date('Y-n-j',strtotime($last[0]->MAX_m));
	echo "最后更新时间:" . $last;
?>

十一、当前时间

<?php $hourdiff = "8"; //这里的8是根据时区来的,国内主机为8
	$timeadjust = ($hourdiff * 60 *60);
	$melbdate = date("Y-m-d H:i",time() + $timeadjust);
	Print ("当前时间:" . "$melbdate");
?>
更多资讯请关注微信公众号:沐雨听风与狂言疯语(haomaoyys)
本文标签: 
本文链接: http://boliquan.com/wordpress-site-info-code/
版权所有: 玻璃泉, 转载请注明本文出处。
打赏

200 thoughts on “[转载]wordpress网站信息代码

  1. Hey there! Do you know if they make any plugins to aaaecabbgdde

  2. Normally I do not read post on blogs, but I wish to say that this writeup very compelled me to try and do it! Your writing style has been surprised me. Thanks, quite great article. afkdcadgeedk

  3. Hello. And Bye.

  4. This is a really great resource!So much useful info and handy tips, thanks a lot =)
    http://www.khabarica24.com/employ-a-top-notch-investigation-paper-writing-14/

  5. This is an amazing article. This site has lots of useful things, it made it easier for me in many ways.
    https://phototime.com/custom-essay-writing-order-your-essay-today-415/

  6. I am amazed. I don’t think I’ve met anybody who understands just as much about this as you do. You should make a career of it, really, impressive blog
    http://earth-official.net/4830

  7. It is a really great site!So much helpful information and handy tips, bless you =)
    http://www.binalbagan.gov.ph/balancing-on-line-college-studies-work-and-301/

  8. Recently I have come across one article which I assume you could find interesting. Somebody may take a steaming dump all over it, however it clarified some of my questions.
    https://indexboss.com/custom-essay-writers-286/

  9. Wonderful site, how do you find all this information?I’ve read through a few articles on your website and I really enjoy your writing style. Thanks a million, keep up the great work.
    http://e-psihiatrie.ro/availing-the-benefits-of-via-the-internet-writing-39/

  10. Wonderful website, how do u get all this info?I have read through a few articles on your website and I love your writing style. Thanks a million, keep up the good work.
    http://mayincugiare.org/how-online-writing-services-help-students-110/

  11. I have discovered a lot of helpful info on your website particularly this page. Many thanks for sharing.
    http://taipanarchitecturalsalvage.com/custom-essay-writing-services-100-215/

  12. I’ve seen something very similar in some other thread. You will probably find some parts of that post helpful, not everything obviously, but I still think it is worth checking out.
    http://egyptembassy.us/?p=3315

  13. Awesome! This may be by far the most useful thing on the subject I’ve ever read. Thanks for your effort.
    http://zimouimmo.com/essays-and-its-altering-elements-of-significance-148/

  14. Many thanks for sharing with us, I always discover interesting things from your posts.
    http://clanky-pr.info/2017/03/correct-systems-for-your-crafting-must-have/

  15. it’s my very first time visiting your site and I’m very interested. Thanks for sharing and keep up 😉
    http://newnationalmedicalcentre.com/custom-essay-writing-308/

  16. We are sorry, but presently there are no Paris based companions available. Paris companion women – is another issue.

    https://www.bucketlistly.com/users/cooneycooney5

  17. hot news of USA We n we publish all of them fresh and advanced events USA, analytics experts. All bad in the world happens with the quiet tacit consent of the indifferent. No one provides us with incentives. We are Disinterested. We are building a civil society. The people are the bearer of sovereignty and the only source of power. No one can usurp power. Useful topics – Terror and piracy Georgia Business

    http://nef2.com/wp-admin/images/2.jpg alt=Donbass border=10 height=90 width=240
    TWITTER
    FACEBOOK
    GOOGLE+
    PETS

  18. Many thanks for a really fantastic blog. It was very helpful. I’m so glad I came across this.
    http://www.bippoadvisor.com/essays-and-its-altering-aspects-of-significance-64/

  19. Thank you for the blog, it’s filled with so much useful info. Reading this helped me a lot.
    http://oahcc.org/?p=2634

  20. I read through this amazing site and you have so much useful information, saved to my bookmarks
    http://khouribgainfo.com/?p=6717

  21. I’ve seen something very similar in a different thread. You will probably find some parts of that article useful, not everything obviously, but I still think it is worth looking into.
    http://sunraytravels.com/2016/04/20/get-professional-essays-with-our-service/

  22. At most effective essay composing provider analyze system, college students can get most helpful solutions of most suitable essay crafting solutions by professional review articles and scores | Dissertation crafting.

    http://picka.lucka.jp/4832

  23. I’ve discovered quite a lot of useful info on your website this page in particular. Thank you for posting.
    http://www.nirmaldevelopers.net/expert-essay-producing-service-is-your-saving/

  24. Do you mind if I quote a few of your posts as long as I provide credit and sources back to your weblog? My blog is in the very same niche as yours and my users would truly benefit from a lot of the information you present here. Please let me know if this alright with you. Thank you! akkddkbfddkc

  25. Beneficial Location Hi gentleman the following transpire a number of web page link with the aim of represses information that will a person may possibly acquire positive yourselves. The Significance Verifying away from home. eeceadekdedb

  26. http://dkjshye7s632.com
    Nice post. I learn something more difficult on totally different blogs everyday. It is going to always be stimulating to read content from other writers and apply somewhat something from their store. I’d want to make use of some with the content material on my blog whether or not you don’t mind. Natually I’ll offer you a hyperlink on your net blog. Thanks for sharing.

  27. Right here you might actually buy essay via the web of top of the range | We’ve been ready to take care of quite possibly the most tough and urgent orders | Papers acquired below will definitely provide you an A!

    http://embassyoffaith.org.uk/balancing-on-line-college-studies-operate-and-8/

  28. Hey! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good gains. If you know of any please share. Many thanks! bfgdceceggfbafek

  29. you’re truly a just right webmaster. The site loading speed is incredible. It kind of feels that you are doing any distinctive trick. In addition, The contents are masterpiece. you’ve performed a magnificent task in this subject! efdgakgebgfk

  30. Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how can we communicate? ceekcdfdegfdbakk

  31. As soon as I detected this site I went on reddit to share some of the love with them. bbbdfcacedda

  32. I got what you intend, thankyou for putting up.Woh I am glad to find this website through google. It is a very hard undertaking to seek to please everybody. by Publilius Syrus. akgeebebaekd

  33. Magnificent website. Lots of useful information here. Im sending it to some friends ans also sharing in delicious. And obviously, thanks for your sweat! ffafefgdbafc

  34. Thanks so much for the article.Much thanks again. Great. addfaefggdbe

  35. Check my recent project
    http://onstrapon.purplesphere.in/?diagram.jalynn
    victorian erotic ertoic mask classic erotic telugu erotic stories erotic gifts

  36. girls girls girls live free cam girls

  37. I am fascinated. I do not think I know anybody who knows as much about this as you do. You should make a career of it, honestly, great site
    http://www.thescentshack.com/essays-and-powerpoint-by-far-the-most-extensively-15/

  38. Incredible a good deal of beneficial advice.
    cialis farmacias guadalajara india cialis 100mg cost purchasing cialis on the internet cialis purchasing
    cost of cialis cvs cialis generika in deutschland kaufen cialis pills price each tarif cialis france
    cialis prices http://cialis.webcindario.com cialis 20 mg cut in half http://cialis.webcindario.com
    buy cialis sample pack bulk cialis cuanto cuesta cialis yaho cialis rezeptfrei
    cialis uk cialis uk we choice cialis uk cialis e hiv

  39. I’m fascinated. I do not think I’ve met anyone who knows just as much about the topic. You should make a career of it, honestly, awesome blog
    http://ejercicio10.com/custom-essay-writing-services-100-7-2/

  40. The fraudulent essay community must be outlawed, main teachers and lords have urged as figures obtained by reveal.

    http://support.vidaao.com/buy-custom-essays-1813/

  41. Most effective qualified professional web based essay author corporation is at your support | We enable learners generate tutorial essays and papers from scratch in only just a few clicks.

  42. When I originally commented I clicked the Notify me when new comments are added checkbox and now every time a comment is added I get 4 emails using the same comment. Is there any way you may take away me from that service? Thanks! kadgckfggede

  43. I’m hunting for web sites that contain fantastic recommendations on what’s in fashion and just what top rated makeup products is.. cbegefkeecebceed

  44. I think you have observed some very interesting details , appreciate it for the post. kdcddkdeacek

  45. I really like your writing style, great info, thank you for putting up fcdcakkeeecc

  46. Valuable information. Lucky me I found your site by accident, and I am shocked why this accident did not happened earlier! I bookmarked it. agkefkdkdekdcdad

  47. Happy to become one of several customer for this wonder inspiring site D. ecbdddaeddec

  48. I need to input, like a bunch at the same time as I hadn’t the benefit of examining everything you had to declare, I couldnt rally round on the contrary elude draw your attention before long. The as if you needed an excellent grasp on the subject kcekbaecdecd

发表评论

电子邮件地址不会被公开。 必填项已用*标注

Help

Copyright © 2009-2018 沐雨听风与狂言疯语  | Powered by WordPress  | 网站地图  |  访客留言  | 冀ICP备15004690号  |   | WordPress theme: Kippis 1.15

%d 博主赞过: