Archive | /wp-includes/post.php RSS feed for this section

wp_count_posts

Count number of posts of a post type and is user has permissions to view.This function provides an efficient method of finding the amount of post’s type a blog has. Another method is to count the amount of items in get_posts(), but that method has a lot of overhead with doing so. Therefore, when developing for 2.5+, use this function instead.

3501

Continue reading

wp_count_attachments

Count number of attachments for the mime type(s).If you set the optional mime_type parameter, then an array will still be returned, but will only have the item you are looking for. It does not give you the number of attachments that are children of a post. You can get that by counting the number of children that post has.

3497

Continue reading