TeppoM (@teppom)

Forum Replies Created

Viewing 1 replies (of 1 total)

  • TeppoM
    Participant

    @teppom

    Thanks for the thread. Based on this I managed to develop a solution that does not require hassling with the template files. Just add this to function.php in your theme:

    /**
    * Add @mentionname after bbpress forum author details
    */
    
    add_action( 'bbp_theme_after_reply_author_details', 'mentionname_to_bbpress' );
    function mentionname_to_bbpress () {
    $user = get_userdata( bbp_get_reply_author_id() );
    if ( !empty( $user->user_nicename ) ) {
    $user_nicename = $user->user_nicename;
    echo "@".$user_nicename;
    }
    }
    
Viewing 1 replies (of 1 total)