Notifications
Clear all

Limited Support

Our team is currently on holiday, so support will be limited during this period. Response times may be slower than usual, and some inquiries may be delayed.
We appreciate your patience and understanding, and we’ll resume our usual support by the end of August.

 

[Closed] CPT count in Blog Activity Data

2 Posts
2 Users
0 Reactions
731 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: 5483
 Sofy
Admin
(@sofy)
Support Team
Joined: 8 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 )