WordPress 中文文档

Function Reference/get usernumposts

From WordPress Chinese

Jump to: navigation, search

目录

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

Template:Parameter

用户