Skip to:
Content
Pages
Categories
Search
Top
Bottom

User’s @hashtag like the forum here?

  • @tkserver

    Participant

    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

    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

    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

    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

    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

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

    @tkserver

    Participant

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

    @robkk

    Moderator

    Chrome on W10.

    WIthout CSS

    With CSS

    null

    @tkserver

    Participant

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

    @robkk

    Moderator

    Yeah its all good.

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

    @tkserver

    Participant

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

    @advika58

    Participant

    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