How can I add badges to users
I’m trying to add my cred badges to users that’s have the highest topics but I couldn’t achieve this please help me out
<?php foreach ( get_users( ‘order=DESC&orderby=post_count&number=5’ ) as $user ) : ?>
<?php $user = get_current_user_id();
$badge_id = 1;
mycred_assign_badge_to_user( $user, $badge_id, 1 ); ?>
- You must be logged in to reply to this topic.