DEV Community

Moursalin islam
Moursalin islam

Posted on

Show Total Register User in WordPress

Display Total Register User in #WordPress Using custom code (short-code)

  1. Put this code in your theme function.php file

// Create a shortcode to display total registered users
function total_registered_users_shortcode() {
$user_count = count_users();
return 'Total Registered Users: ' . $user_count['total_users'];
}
add_shortcode('total_users', 'total_registered_users_shortcode');

  1. use the short-code to display post/page anywhere

[total_users]

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more