Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

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

3 Posts
2 Users
1 Reactions
2,691 Views
arcticsolutions
Posts: 22
Topic starter
(@arcticsolutions)
Eminent Member
Joined: 7 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: 10600
Admin
(@robert)
Support Team
Joined: 10 years ago

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

<?php $user_posts = wpforo_member( $userid, 'posts' ); ?>

1 Reply
arcticsolutions
(@arcticsolutions)
Joined: 7 years ago

Eminent Member
Posts: 22

Thank you, that did the trick 🙂

Brgds
Rune