Codex

Function Reference/get usernumposts

Contents

Description

Returns the post count for the user whose ID is passed to it. Properties map directly to the wp_posts table in the database (see Database Description).

Usage

 <?php get_usernumposts(userid); ?> 

Example

Default Usage

The call to get_usernumposts returns the number of posts made by the user.

<?php echo 'Posts made: ' . get_usernumposts(1); ?>

Posts made: 143

Parameters

$userid
(integer) (required) The ID of the user whose post count should be retrieved.
Default: None