Fluent Community Members Widget – WordPress Dashboard Plugin

Fluent Community Members
Fluent Community Members

Introducing the Fluent Community Members Widget Plugin

The Fluent Community Members Widget plugin, developed by Scot Birchfield, is a sleek and functional addition to your WordPress dashboard. This plugin is designed to bring a more interactive and community-driven experience to your website administrators by showcasing a list of Fluent Community members directly within the dashboard. Packed with useful features and an intuitive interface, this widget is a must-have for anyone looking to foster a sense of community among users.


Plugin Details

  • Name: Fluent Community Members Widget
  • Description: Displays a list of Fluent Community members in the WordPress dashboard with profile images, links to their profiles, and a total member count.
  • Version: 1.3
  • Author: Scot Birchfield

Key Features

  1. Comprehensive Member Display
    The plugin integrates seamlessly into the WordPress dashboard, showcasing a list of community members. Each member entry includes:
    • A profile image for easy recognition.
    • A clickable link to their detailed profiles.
  2. Real-Time Member Count
    At a glance, administrators can view the total number of members in the Fluent Community, updated dynamically to reflect changes in membership.
  3. Lightweight and Fast
    Built with performance in mind, the widget is optimized to load efficiently without slowing down the WordPress dashboard.
  4. User-Friendly Interface
    Scot’s focus on simplicity ensures that the widget is easy to use, even for non-technical users.

Installation and Setup

  1. Download and Activate FluentSnippet
    Download the plugin from the WordPress repository or upload it manually via the Plugins section of your WordPress admin panel.
  2. Configure the new script
    Once activated, navigate to the WordPress dashboard for FluentSnippets. Create a new functions script and paste the coding in. Name, save, and activate the script.
  3. Enjoy the Community Interaction
    Start engaging with your Fluent Community right from your dashboard!

Use Cases

  • Engage with Your Community
    Administrators can quickly see who is active in the Fluent Community and navigate to their profiles for interaction.
  • Monitor Community Growth
    The real-time member count provides a quick snapshot of your community’s growth over time.
  • Promote Collaboration
    The profile links make it easy for admins and team members to connect with key individuals in the community.

FC members
FC Members

What’s New in Version 1.3?

  • Enhanced Profile Image Support: Higher resolution and compatibility with custom avatars.
  • Improved Performance: Reduced server calls for faster loading.
  • Bug Fixes: Resolved minor issues from previous versions to improve stability.

I use fluent snippet plugin for all my functions, js, and CSS:

About the Author

Scot Birchfield is a dedicated WordPress developer passionate about creating plugins that enhance functionality and user experience. With years of experience and a knack for problem-solving, Scot’s plugins are known for their reliability and intuitive designs. Check out more of his work at https://wpscriptly.com.


The Fluent Community Members Widget is an excellent way to bring a sense of belonging and connection to your WordPress community. Download it today and elevate your dashboard with this simple yet powerful tool!

Please modify this code section if you change the name of the community from portal!
// Modify this variable if you change the portal name
        $profile_url = site_url('/portal/u/') . urlencode($user->user_login);
/*
 * Plugin Name: Fluent Community Members Widget
 * Description: Displays a list of Fluent Community members in the WordPress dashboard with profile images, links to their profiles, and a total member count.
 * Version: 1.3
 * Author: Scot Birchfield
 */

// Exit if accessed directly
if (!defined('ABSPATH')) {
    exit;
}

// Register the dashboard widget
function fcmw_register_dashboard_widget() {
    wp_add_dashboard_widget(
        'fcmw_dashboard_widget',
        'Fluent Community Members',
        'fcmw_display_dashboard_widget'
    );
}
add_action('wp_dashboard_setup', 'fcmw_register_dashboard_widget');

// Add inline CSS for styling the widget
function fcmw_add_inline_css() {
    $css = "
        .fcmw-member-list {
            display: flex;
            flex-wrap: wrap;
            list-style: none;
            padding: 0;
            margin: 0;
        }

        .fcmw-member-item {
            width: 50%; /* Each column takes up half the width */
            margin-bottom: 10px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
        }

        .fcmw-member-avatar {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            margin-right: 10px;
        }

        .fcmw-member-link {
            font-size: 14px;
            font-weight: bold;
            text-decoration: none;
            color: #0073aa; /* WordPress default link color */
        }

        .fcmw-member-link:hover {
            text-decoration: underline;
        }

        .fcmw-member-count {
        border-top:1px solid #dcdcdc;
            margin-top: 15px;
            font-size: 14px;
            font-weight: bold;
            text-align: right;
        }
    ";
    echo '<style>' . $css . '</style>';
}
add_action('admin_head', 'fcmw_add_inline_css');

// Display the dashboard widget content
function fcmw_display_dashboard_widget() {
    global $wpdb;

    // Query to fetch user data
    $users = $wpdb->get_results("
        SELECT ID, display_name, user_login
        FROM {$wpdb->users}
        ORDER BY display_name ASC
    ");

    if (empty($users)) {
        echo '<p>No members found.</p>';
        return;
    }

    // Count total members
    $total_members = count($users);

    echo '<ul class="fcmw-member-list">';
    foreach ($users as $user) {
        // Generate the profile link
        // Modify this variable if you change the portal name
       $profile_url = site_url('/portal/u/') . urlencode($user->user_login);
            // Get the user's avatar URL
        $avatar_url = get_avatar_url($user->ID, ['size' => 20]);

        echo '<li class="fcmw-member-item">';
        echo '<img src="' . esc_url($avatar_url) . '" alt="' . esc_attr($user->display_name) . '" class="fcmw-member-avatar">';
        echo '<a href="' . esc_url($profile_url) . '" target="_blank" class="fcmw-member-link">';
        echo esc_html($user->display_name);
        echo '</a>';
        echo '</li>';
    }
    echo '</ul>';

    // Display the total member count
    echo '<div class="fcmw-member-count">';
    echo 'Total Members: ' . esc_html($total_members);
    echo '</div>';
}

Notes:

Wp Scriptly

This basic script, CSS style, and plugin are designed to function optimally assuming minimal interference from your theme or other plugins. If conflicts occur or further customization is needed, additional adjustments may be necessary. Please note that this script, CSS style, or plugin must be used AS IS.

Wp Scriptly

Newsletter signup

WpScriptly

Subscribe to my WpScriptly newsletter for WordPress tips, plugin tutorials, and exclusive updates—delivered straight to your inbox!

2 Comments

Reskator

BE CAREFULL, you must remember to modify the value of the $profile_url variable before integrating this script into your site.
Ideally, you should give more visibility to this variable.
For example, by allowing it to be initialized at the very beginning of the script.