How to Show User Registration Date in WordPress Website

Show User Registration Date in WordPress Website

How to Show User Registration Date in WordPress Website.

You might have seen user’s registration date in some of the membership websites and forums. If you also want to show user registration date in WordPress website you have developed then this article is for you. In this article, we will take you through How to Show User Registration Date in WordPress Website using a shortcode.

Perform the below steps to Show User Registration Date in WordPress:

  1. Login to Cpanel.
  2. Click on File Manager and access its Public_HTML folder.
  3. Open this folder and look for wp-content.
  4. Double-click the wp-content folder to open it.
  5. Now, double-click the themes folder and open it.
  6. Find the folder having the name of your current WordPress theme and open it.
  7. Locate functions.php file and edit it.
  8. Once the file is opened for editing, add the below code in that file:
function user_reg_date($atts, $content = null ) {
$userlogin = shortcode_atts( array(
'user' => FALSE,
), $atts );
$uname = $userlogin['user'];
if ($uname!== FALSE) {
$user = get_user_by( 'login', $uname );
if ($user == false) {
$message ='Sorry user is not found.';
} else {
$udata = get_userdata( $user-ID );
$registered = $udata->user_registered;
$message =  'Member from: ' . date( "d F Y", strtotime( $registered ) );
}
} else {
$message = 'Please provide a username.';
}
return $message;
}
add_shortcode('memberfrom', 'user_reg_date');
  1. Now, you are ready to display user’s registration date in wordpress website using the shortcode given below:

[memberfrom user=xyz]

Replace xyz with the user name.

This is how to Show User Registration Date in WordPress Website. And, if you also want to show Show User Registration Date in Admin console then perform the below steps:

  1. Login to WordPress.
  2. Select Plugins > Add New.
  3. In the search field type CodePress Admin Columns and find it.
  4. Install and activate this plugin.
  5. Now, go to Settings > Admin Columns.
  6. Select Users > Add column. You will see options where you can configure this plugin to display user’s registration date.
  7. In the Type drop-down select, Registered.
  8. Give a name to this column like User Registration Date.
  9. Save changes.
  10. Navigate to the Users screen. Here you will see the new column showing user’s registration date.

I hope you have received an answer to the question How to Show User Registration Date in WordPress Website.

See here the tutorial for Show User Registration Date in WordPress Website.

2 Responses to “How to Show User Registration Date in WordPress Website”
  1. Emely91
    • Anne Marie

Leave a Reply

Your email address will not be published. Required fields are marked *

About US | Terms and Conditions of Use | Privacy Policy | Affiliate disclosure
All original content on these pages is fingerprinted and certified by Digiprove