Support » Fixing WordPress » manage_users_custom_column returning results outside of table

  • Resolved patrick128

    (@patrick128)


    My code to create custom columns in the User backend page is working fine, except that the results are outputting to above the table, rather than where they should be.

    I found a similar question asked before, but still can’t figure out what I’m doing wrong: https://wordpress.org/support/topic/manage_users_custom_column-strange-behavior?replies=6

    Here is my code:

    add_filter ('manage_users_columns', 'add_address_column');
    function add_address_column ($columns)
    	{
          $columns['evsy_address'] = 'Address';
          return $columns;
    	}
    
    add_filter ('manage_users_custom_column', 'view_address_column', 11, 3);
    function view_address_column ($value, $column_name, $id) {
        if ($column_name == 'evsy_address') {
                if (!bp_profile_field_data( 'field=Address&user_id='.$id ) === NULL) {
                    	$value = bp_profile_field_data( 'field=Address&user_id='.$id );
                    	return $value;
                }
        }
    }

    Any ideas as to what I’m missing? Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘manage_users_custom_column returning results outside of table’ is closed to new replies.