Heads up!
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
This article contains PHP code and is intended for developers. We offer this code as a courtesy, but don't provide support for code customizations or 3rd party development.
Use this filter for toggling off the user meta that is displayed on user profiles.
Usage
add_filter( 'frmreg_show_meta_on_profile', '__return_false' );
Parameters
- $show (boolean)
- $user_profile (object)
Examples
Hide the profile meta
By default, Formidable user meta appears at the bottom of a user profile page. Use this code example to hide it.
add_filter( 'frmreg_show_meta_on_profile', '__return_false' );
Hide meta for a specific user ID
add_filter( 'frmreg_show_meta_on_profile', 'hide_meta_for_specific_user', 10, 2 );
function hide_meta_for_specific_user( $show, $user_profile ) {
$target_user_id = 43; // Replace 43 with the ID of the User ID field.
if ( $user_profile instanceof WP_User && $target_user_id === $user_profile->ID ) {
$show = false;
}
return $show;
}