2 mgsolipa Oct 09, 2014 07:32

Ok its worked :)
thank you so much!
I checked this again and an error will be displayed if you are not logged in. So you should do somehting like this:
if ( isset($current_User) )
{
echo T_('Number of posts') . ' ' . $current_User->get_num_posts();
}
MG
Hi @denis012,
As you referred,
get_num_posts
is the right way to get the count of posts made by a particular user, but it is a method and it has to be invoked as a function (with a pair of parenthesis at the end of the statement).Example:
I tested by adding that statement at the beginning of the
_sidebar.inc.php
file included in the evoPress skins, and I got the result shown in the screenshot.Note: you can also use
$current_User->get_reputation_posts()
to show the percentage of public posts.Regards!