• Resolved teeboy4real

    (@teeboy4real)


    Hello,

    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 ); ?>
    <span>
    <?php echo $current_user->display_name; ?>
    <span class="user-nicename">
    <em>
    @<?php echo bp_core_get_username( bp_loggedin_user_id() ); ?>
    </em>
    </span>
    </span>
    </a>
    </li>

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

    Thanks

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

    (@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.

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Help with code’ is closed to new replies.