Quote:
Originally Posted by nemrod
There are two problems.
First is that you've changed the default value for the $post_type argument from 'post' to 'member'. 'member' isn't a post type and so 0 will always be returned (unless you pass an argument that replaces it). Change it back to post or page or any other valid post type.
Second is that you're not actually displaying the result. The function returns an integer, but you never echo it. "echo count_user_posts_by_type(19);" will do the trick.
|
That worked, so thank you Mr. Nice Viking!
I've registered member as a custom post type, and the user of the ID value 19 has created some posts on it, and I want to count these posts.
You're right, it works for post and page, so how should I make it work with the custom post type of 'member'?