Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

count_user_posts()

3 tags 1 category

count_user_posts() — Gets the number of posts a user has written.

Inputs: $userid (int): User ID. $post_type (array|string): Optional. Single post type or array of post types to count the number of posts for. Default ‘post’. $public_only (bool): Optional. Whether to only return counts for public posts. Default false.

Returns string: Number of posts the user has written in this post type.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…