Advertisement
vapvarun

display name xprofile field before username for Reign theme only

Jan 17th, 2022
669
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // display name xprofile field before username for Reign theme only
  2. if ( !function_exists( 'reign_bp_display_xprofile_name' ) ) {
  3.     add_action( 'reign_bp_before_displayed_user_mentionname', 'reign_bp_display_xprofile_name', 10 );
  4.  
  5.     function reign_bp_display_xprofile_name() {
  6.         global $wbtm_reign_settings;
  7.         ?>
  8.         <h2 class="user-name"><?php echo xprofile_get_field_data( 'Name'); ?></h2>
  9. <?php
  10.     }
  11.  
  12. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement