How do I display an author’s post count in a sidebar? I am trying to make a widget that shows the number of posts an author has made (as well as the number of blog posts they have made). I currently only have a local copy of the site, but will be putting it online very soon for demonstration.
In my sidebar, I am using bbp_get_user_oost_count() and feeding the author ID using get_the_author_meta(‘ID’), but the post count is coming back as 0, even though I have made a topic in the forum and posted a reply to that topic. Is there a way to get the post count into my widget? It will appear in my sidebar and show the number of posts for the author, not the logged in user.
@henrywright No, it’s in relation to a post I made on the main WordPress forum: https://wordpress.org/support/topic/author-box-outside-of-the-loop?replies=1. Since then, I have found all the functions apart from the number of forum posts. I have only now realised that I posted this in BuddyPress, and not bbPress, which is the area I am looking for. I have both the blog posts and the blog comments working, and I also have my friends count displaying, but not the forum posts.