Test banner giving
// Add Shortcode function custom_shortcode( $atts ) { // Attributes $atts = shortcode_atts( array( 'banner_id' => '1', ), $atts, 'give_banner' ); $user_id = get_current_user_id(); $badge_id = badge_id; mycred_assign_badge_to_user( $user_id, $badge_id, 1 ); } add_shortcode( 'give_banner', 'custom_shortcode' );