1 denis012 Oct 04, 2014 08:50
3 denis012 Oct 09, 2014 09:30
Ok its worked :)
thank you so much!
4 mgsolipa Oct 11, 2014 08:33
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!