[转载]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/
版权所有: 玻璃泉, 转载请注明本文出处。
打赏

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

  1. Thank you a lot for giving everyone an extraordinarily wonderful chance to read articles and blog posts from this website. It is always very superb and as well , stuffed with fun for me personally and my office co-workers to search your web site at minimum thrice a week to see the newest tips you have. And definitely, we’re always satisfied with all the splendid creative ideas you serve. Certain 2 tips in this article are in reality the very best we have ever had.

  2. Thank you so much for giving everyone an exceptionally remarkable opportunity to read in detail from this website. It is always very enjoyable and stuffed with a great time for me personally and my office co-workers to visit your blog the equivalent of thrice in 7 days to learn the fresh issues you have got. And of course, I’m also always amazed concerning the astounding creative ideas you serve. Selected 4 ideas in this post are in reality the very best we have all ever had.

  3. I truly wanted to send a small remark so as to say thanks to you for all the magnificent instructions you are writing on this site. My considerable internet search has at the end of the day been recognized with incredibly good strategies to talk about with my company. I would suppose that many of us site visitors actually are unequivocally fortunate to dwell in a really good network with very many marvellous professionals with very helpful principles. I feel very much fortunate to have come across your web page and look forward to tons of more excellent times reading here. Thanks once again for everything.

  4. phentermine 37.5 mexico pharmacy phentermine 37.5 interactions for phentermine | https://phentermine24.com/ – diet pills phentermine

  5. I am also writing to let you be aware of of the beneficial experience my cousin’s princess developed studying your blog. She came to find a wide variety of issues, which include what it is like to possess a marvelous teaching mindset to make the others really easily thoroughly grasp specific grueling topics. You actually did more than her desires. I appreciate you for giving such warm and friendly, dependable, revealing and also cool guidance on the topic to Tanya.

  6. I’m also writing to let you be aware of what a outstanding experience our child developed studying your web page. She came to find plenty of pieces, which included what it is like to have an ideal helping style to get many people quite simply know precisely several tricky issues. You really did more than her expected results. Thank you for rendering these warm and friendly, trusted, explanatory and in addition fun thoughts on the topic to Mary.

  7. phentermine hcl phentermine phentermine for weight loss | https://phentermine24.com/# – phentermine hcl

  8. I needed to put you one tiny remark in order to say thanks a lot again relating to the marvelous techniques you have contributed in this case. This is so shockingly generous with you giving unhampered exactly what a few people would have offered for sale as an e-book to make some profit on their own, certainly considering that you might have done it in the event you wanted. Those principles also served to become good way to know that many people have the same keenness similar to mine to realize more and more with regard to this issue. I think there are a lot more pleasant situations in the future for people who find out your blog post.

  9. Thanks for a really amazing blog. It was very useful. I am just so happy I discovered this.

  10. I have to express some thanks to you just for rescuing me from this dilemma. Right after scouting throughout the the net and finding notions which were not helpful, I thought my life was well over. Being alive without the answers to the issues you’ve resolved by means of your entire guideline is a critical case, and the ones that would have negatively affected my career if I hadn’t noticed your blog. Your own understanding and kindness in maneuvering the whole lot was important. I am not sure what I would’ve done if I had not come across such a subject like this. I can also at this point relish my future. Thanks so much for your reliable and results-oriented help. I will not hesitate to suggest your web sites to any person who should have assistance about this situation.

  11. It is a good post. This site is loaded with lots of useful things, it really helped me in many ways.

  12. I’m just writing to let you understand of the brilliant experience our princess found browsing your site. She discovered many details, most notably how it is like to have a marvelous coaching mindset to make others easily know precisely specific tortuous things. You really surpassed my expected results. Thank you for delivering the productive, safe, explanatory and as well as fun tips on this topic to Emily.

  13. I’ve discovered a lot of helpful info on your site particularly this page. Thanks for sharing.

  14. This is a really great resource!So much helpful information and handy ideas, thanks =)

  15. I have to express my thanks to this writer just for rescuing me from this particular trouble. Just after researching throughout the online world and coming across proposals which are not pleasant, I was thinking my life was over. Existing without the presence of answers to the problems you have solved as a result of your main website is a crucial case, and those which may have negatively damaged my career if I had not discovered your site. That know-how and kindness in taking care of all the stuff was very useful. I don’t know what I would have done if I had not encountered such a subject like this. I’m able to now look forward to my future. Thank you very much for your expert and amazing help. I won’t hesitate to endorse your site to anyone who would like guidelines about this area.

  16. Amazing site, how do u find all this information?I have read a couple of posts on your site and I love your style. Thanks a million, keep up the great work.

  17. I wanted to put you that very small observation to be able to thank you very much yet again just for the unique basics you have contributed here. It has been quite wonderfully generous with you to grant extensively just what a lot of folks would have offered for an e-book to help make some dough for their own end, and in particular since you could have done it in case you wanted. Those creative ideas as well acted to become good way to fully grasp the rest have the identical zeal really like my personal own to know great deal more pertaining to this problem. I am certain there are many more fun times ahead for individuals who take a look at your website.

  18. I and also my friends were found to be studying the nice secrets and techniques from your website and so all of the sudden got an awful suspicion I never thanked the blog owner for those strategies. My men ended up for that reason joyful to study all of them and already have in fact been having fun with these things. I appreciate you for actually being considerably accommodating and for choosing this kind of cool topics millions of individuals are really eager to learn about. Our own honest regret for not expressing appreciation to you sooner.

  19. Thank you for all your labor on this web page. Kate loves going through investigations and it is obvious why. I notice all relating to the powerful mode you produce efficient secrets on this website and as well as strongly encourage contribution from others on this concern then my girl is without question becoming educated a lot. Take advantage of the remaining portion of the new year. You’re the one conducting a brilliant job.

  20. I want to express some appreciation to the writer just for rescuing me from such a dilemma. Just after surfing through the internet and getting views which are not powerful, I figured my entire life was gone. Being alive without the presence of answers to the issues you have sorted out by way of this posting is a serious case, as well as those that would have negatively affected my entire career if I hadn’t noticed the website. Your own personal ability and kindness in controlling all areas was very helpful. I’m not sure what I would have done if I hadn’t come upon such a solution like this. I am able to at this point relish my future. Thanks a lot very much for the skilled and result oriented guide. I will not think twice to refer the blog to anybody who needs assistance about this subject.

  21. My husband and i have been absolutely lucky that John managed to deal with his homework by way of the ideas he got when using the web site. It is now and again perplexing to simply happen to be giving for free guidance that many a number of people have been making money from. And we grasp we now have the writer to appreciate because of that. The type of illustrations you made, the easy site navigation, the friendships you can make it easier to instill – it’s mostly excellent, and it’s really letting our son in addition to us understand this situation is excellent, which is certainly truly serious. Thanks for the whole lot!

  22. I have to show my admiration for your kindness supporting men and women who should have assistance with the subject matter. Your special dedication to passing the message all-around became incredibly powerful and have in most cases enabled somebody much like me to reach their pursuits. Your own important advice entails a great deal a person like me and additionally to my office colleagues. Warm regards; from each one of us.

  23. I needed to draft you this very small word to finally thank you very much again for all the stunning pointers you have featured here. This is simply particularly open-handed of you to grant without restraint what exactly many individuals could have offered for sale as an e book in making some cash for themselves, especially seeing that you might well have done it if you decided. The smart ideas in addition acted to provide a fantastic way to understand that the rest have a similar desire really like my own to learn somewhat more related to this issue. Certainly there are millions of more pleasant moments ahead for people who find out your blog.

  24. I wish to show my respect for your generosity giving support to all those that have the need for help with your question. Your real commitment to passing the solution all around had been amazingly good and have in most cases helped women just like me to reach their ambitions. Your new useful help implies much to me and far more to my office workers. Warm regards; from everyone of us.

  25. It is an excellent post. This site is loaded with lots of useful things, it helped me in many ways.

  26. Great post\Nice post, I love it very much.I was pretty lucky to discover your site. There’s a lot of helpful info!

发表评论

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

Help

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

%d 博主赞过: