Use the Wp_count_posts function in WordPress to count the number of articles, wordpresswpposts
Isn't it cool to do a total station statistic? The long-term blog less and fewer, why not give yourself a statistic, see how much you have worked on this
Open the wp-config.php file under the root directory and locate the [php] require_once (abspath. ' wp-settings.php '); Add the following code in front of it: [php] $yovisunhome = ' http://'. $_server[' Http_host ']; $yovisunsiteurl = '
Forgive me link: http://www.ludou.org/wordpress_query_posts.html
First, we will introduce how to use the query_posts function. Find the archive page file in the topic Directory, which includes index. PHP, archive. PHP. Generally, archive is used for
Today talk about WordPress's main query function-query_posts (), because I am working on the theme of the use of this function many times.
The query_posts () query function determines which articles appear in the main WordPress loop (loop), and
Through the preceding SQL statement, we can clearly understand that the wordpress comment table is wp_comments, and the comment_approved is the comment response field.Comment_approved is equal to 1: Review commentsComment_approved equals 0: comment
Useless topic information dominated by add_action and remove_action is deleted.
In most WordPress Themes, some platform information, developer information, cache files, and so on are inevitable. In this case, some things are rarely used, and some
Isn't it cool to do a total station statistic? The long-term blog less and fewer, why not give yourself a statistic, see how much you have worked on this blog, not only to give themselves also to tourists, wp_count_posts is used in WordPress to
: This article describes how to use the wp_count_posts function in WordPress to count the number of articles. if you are interested in the PHP Tutorial, refer to it. Is it cool to make a full-site statistics? There are fewer and fewer blogs for a
The query_posts function is used in the WordPress topic to control which articles can appear in the main loop. It may be said that many people do not understand the main loop. For example, the articles on the home page and archive page (including
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.