Skip to:
Content
Pages
Categories
Search
Top
Bottom

Add custom WordPress function to BuddyBar?


  • Dan
    Participant

    @thedan1984

    Is there a way I can add custom data to the top bar?

    I have a custom function that displays the number of “points” a user has accumulated. Currently I’m calling that in my header and the number is displayed there. Ideally, I’d like to show that number on the BuddyBar.

    The code for the function looks like this:

    <?php
    global $current_user, $bp;
    get_currentuserinfo();
    $score = get_user_score($current_user->ID);
    printf( ‘<span class=”pp”>’.$score.'</span>
    ?>

    Is it possible to get that displaying in the top bar?

  • The topic ‘Add custom WordPress function to BuddyBar?’ is closed to new replies.
Skip to toolbar