How to find if user has made a post before?
-
I am customizing a template. In it, I need to check if the currently logged in user has made any previous post. Just a Yes/No (or the number of posts if it is easier).
I tried this:while ( have_posts() ) : the_post(); if (the_author('login',FALSE)==$loggedinusername){ $postcounter=the_author_posts(); } endwhile;
But all I get is the repeated display of the # of posts (in the displayed page) made by the logged-in user.
The variable $postcounter returns nil.
There must be an easier way to do this…
Please help.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘How to find if user has made a post before?’ is closed to new replies.