How to customize the fields output on profile page

The wpum_field_ouput_callback_function filter passes 3 arguments, the original callback function used for the field, the field object and the value. See here for the source code

Example field output customization:

The filter can be used to use a custom function to modify the output of the field within profiles pages. By default WPUM uses separate functions for each field output.

An example can be seen here for the URL field output which prints an HTML anchor tag.

By using the filter, you can tell WPUM to use another function to print the field output on the profile page. In the following example, I'm modifying the output of the Website field, by checking it's name. Other methods can be used to determine the field.


function wpum_custom_field_output( $func_name, $field, $value ) {

	if ( $field->get_name() == 'Website' ) {
		return 'my_custom_function';

	return $func_name;

add_filter( 'wpum_field_ouput_callback_function', 'wpum_custom_field_output', 10, 3 );

function my_custom_function( $field, $value ) {
	return '<i><a href="'. esc_url( $value ) .'" target="_blank" rel="noopener noreferrer">'. esc_html( $value ) .'</a></i>';
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.