Notifications
Clear all

wpForo 1.x.x [Closed] Get users post and topic count programmatically

3 Posts
2 Users
1 Reactions
2,125 Views
arcticsolutions
Posts: 22
Topic starter
(@arcticsolutions)
Eminent Member
Joined: 6 years ago

Is there any code snippet i can use to get users post count?

I want to offer a discount in my webshop for forum users that has more than ie. 10 posts/topics. Thats why i need to get the count / activity of the user in my php code.

Thanks
Rune

2 Replies
Robert
Posts: 10587
Admin
(@robert)
Support Team
Joined: 9 years ago

Try this code, the $userid should be defined by you:

<?php $user_posts = wpforo_member( $userid, 'posts' ); ?>
1 Reply
arcticsolutions
(@arcticsolutions)
Joined: 6 years ago

Eminent Member
Posts: 22

Thank you, that did the trick 🙂

Brgds
Rune