Notifications
Clear all

[Closed] CPT count in Blog Activity Data

2 Posts
2 Users
0 Reactions
611 Views
Posts: 10
Topic starter
(@jarruego)
Eminent Member
Joined: 4 years ago

Hello,

In the blog activity data, is it possible to also count the number of Custom Post type that the user has created?

Thank you

Topic Tags
1 Reply
Sofy
Posts: 4843
 Sofy
Admin
(@sofy)
Support Team
Joined: 7 years ago

Hi @jarruego,

Please follow the steps below:

1. Customize the wp-content/plugins/wpforo/wpf-themes/classic/profile-home.php file as described in this doc: https://wpforo.com/docs/root/forum-themes/theme-customization/

2. Find this code: 

WPF()->member->blog_posts(WPF()->current_object['userid'])

3. Replace with the following one: 

count_user_posts( WPF()->current_object['userid'] , array('post', 'page', 'custom_post_type'), true )