Advertisement
vapvarun

display name xprofile field before username for Reign theme only

Jan 17th, 2022
861
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement