Skip to:
Content
Pages
Categories
Search
Top
Bottom

User’s @hashtag like the forum here?


  • TKServer
    Participant

    @tkserver

    I notice user’s hashtags appear here under the user’s name and avatar. I’d like to achieve the same functionality. Is this a plugin, a feature I haven’t noticed, or custom code?

Viewing 11 replies - 1 through 11 (of 11 total)

  • Robkk
    Moderator

    @robkk

    You need custom code. This is the custom code you will need to display it in your forums. Place it in your functions.php file, bbpress-functions.php file, or in a functionality plugin.

    function rkk_mentionname_in_bbp() {
        $user = get_userdata( bbp_get_reply_author_id() );
            if ( !empty( $user->user_nicename ) ) {
                $user_nicename = $user->user_nicename;
                echo "@".$user_nicename;
            } 
    }
    
    add_action( 'bbp_theme_after_reply_author_details', 'rkk_mentionname_in_bbp' );
    add_action( 'bbp_theme_after_topic_author_details', 'rkk_mentionname_in_bbp' );

    TKServer
    Participant

    @tkserver

    Fantastic. Thanks very much @robkk. I implemented it on my dev version and it worked great, so it is now on the live site here: http://www.utehub.com/forums/


    Robkk
    Moderator

    @robkk

    Oh yeah no problem.

    Here is a couple things I found when visiting your site.

    The first item in your forum index is a little off because of the bbPress breadcrumbs.

    Adding this CSS will help.

    div.bbp-breadcrumb {
        width: 100%;
    }

    There is an issue with the Freshness column text not really displaying right.

    #bbpress-forums p.bbp-topic-meta {
        text-align: inherit;
    }

    TKServer
    Participant

    @tkserver

    Thanks for the styles. I can see the change in the freshness column but not sure where the issue is in my index, since that’s a static page.


    Robkk
    Moderator

    @robkk

    the Utah Utes forum link is not floated all the way to the left.


    TKServer
    Participant

    @tkserver

    I added that style. Curious what browser or device you are on. Float was ok on chrome/mac.


    Robkk
    Moderator

    @robkk

    Chrome on W10.

    WIthout CSS

    With CSS

    null


    TKServer
    Participant

    @tkserver

    Bizarre. So it is working now I assume? Thanks for all your help my friend.


    Robkk
    Moderator

    @robkk

    Yeah its all good.

    Oh, if you are just not going to use the breadcrumbs you can just display: none; instead.


    TKServer
    Participant

    @tkserver

    That was a problem on mobile too, which is now fix. Thanks @robkk.


    advika58
    Participant

    @advika58

    Custom code is required for displaying it in your forums. You should insert the provided code into either your functions.php file, bbpress-functions.php file, or a functionality plugin.
    https://storysaver.page/

Viewing 11 replies - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Skip to toolbar