Notifications
Clear all

CPT count in Blog Activity Data

2 Posts
2 Users
0 Likes
269 Views
jarruego
Posts: 10
Topic starter
(@jarruego)
Active Member
Joined: 1 year 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
cpt
1 Reply
Sofy
Posts: 4057
 Sofy
Admin
(@sofy)
Support Team
Joined: 5 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 )
Reply
Share: