Created
January 18, 2015 19:09
-
-
Save shahadat014/0d7f1652f0e04d05fd5d to your computer and use it in GitHub Desktop.
Get author post count inside & outside loop , Inside loop: First get user id, Then get post count in loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $author_id= get_the_author_meta('ID'); | |
| echo count_user_posts( $author_id ); | |
| Outside loop | |
| echo count_user_posts( 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment