Skip to content
Create a gist now

Instantly share code, notes, and snippets.

WordPress: Show date of registration in user profile
namespace ShowMemberSince;
add_action( 'plugins_loaded', 'ShowMemberSince\init' );
* Adding needed action hooks
function init(){
foreach( array( 'show_user_profile', 'edit_user_profile' ) as $hook )
add_action( $hook, 'ShowMemberSince\add_custom_user_profile_fields', 10, 1 );
* Output table
* @param object $user User object
function add_custom_user_profile_fields( $user ){
$table =
<table class="form-table">
<p>Member since: %2$s</p>
$udata = get_userdata( $user-ID );
$registered = $udata->user_registered;
date( "M Y", strtotime( $registered ) )

This looks very promising!
I am just struggling with where to add the action and how.
I have been following the instructions here to customise the BP pages, and have been trying to add some code to members-loop.php, but I cannot get anything to show on the front end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.