wp_count_posts(): Count Posts by Status in WordPress
Use wp_count_posts() to count published, draft, page, and other post-type entries by status in WordPress.
Use wp_count_posts() to count published, draft, page, and other post-type entries by status in WordPress.
Use wp_count_terms() to count how many terms exist in a WordPress taxonomy.
Use count_users() to get the total number of users in WordPress and the number of users in each role.
Use wp_count_comments() to count approved, pending, spam, trashed, and total comments for a site or a specific post.
Use get_category_parents() to return a category’s full parent path, optionally with category links and a custom separator.
Use get_extended() in WordPress to split post content into the section before the tag and the section after it.
Use add_rewrite_tag() in WordPress to register custom query variables and use them with add_rewrite_rule() in custom URLs.
Use sanitize_text_field() in WordPress to clean form input and other plain-text strings before saving them.
Use get_the_tags() or wp_get_post_terms() to get the first tag or first taxonomy term attached to a WordPress post.