Support » Plugin: Verified Member for BuddyPress » Help with code

  • Resolved teeboy4real



    Please can you help with this code, I have this code in a menu in my theme and I want to display the badge beside the user’s name

    <li id="user-nav-user-profile" class="no-ajaxy">
    <a href="<?php echo bp_core_get_user_domain( $current_user->ID );?>" class="no-ajaxy">
    <?php echo get_avatar( $current_user->ID, 32 ); ?>
    <?php echo $current_user->display_name; ?>
    <span class="user-nicename">
    @<?php echo bp_core_get_username( bp_loggedin_user_id() ); ?>

    I want to display the verified badge beside <?php echo $current_user->display_name; ?> in the code above


Viewing 1 replies (of 1 total)
  • Plugin Author Themosaurus


    Hi @teeboy4real,

    To do that you can use the “get_user_badge” method from our plugin, like so :

    <?php global $bp_verified_member;
    echo $bp_verified_member->get_user_badge( $current_user->ID ); ?>

    Hope this helps.


Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.