Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

How to display the 'total of members' on a page or post?

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › How to display the 'total of members' on a page or post?

  • This topic has 7 replies, 3 voices, and was last updated 15 years, 1 month ago by nur.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • May 6, 2010 at 8:03 am #1175
    nicoolas
    Member

    Hello,

    I would like to show on my blog the total of leads.

    I stop the subscription to the first 300 members after it’s paying.

    So, I found a php code into the ‘dashboard menu’ file. I would like to know if it’s possible to get the shotcode to display the total members of the blog ??

    Thanks for your great support.

    nicolas

    May 6, 2010 at 2:37 pm #20393
    amin007
    Participant

    You will have to create the shortcode. First you will need to write the function that displays the total number of members then you can add in the shortcode functionality. If you have the function ready (the function that displays the total number of members) then I can tell you how to create a shortcode that exercises that function.

    May 6, 2010 at 9:43 pm #20394
    nicoolas
    Member

    Hi,

    I think that I’ve got the php function.

    Could you tell me how to create a shortcode ?

    thanks,

    nicolas

    May 7, 2010 at 12:57 am #20395
    amin007
    Participant

    This link should help you with that:

    http://codex.wordpress.org/Shortcode_API

    In short you will have to add something like the following to the “wp_eMember1.php” file:

    add_shortcode('wp_eMember_display_total_members', 'display_total_members_count);
    function display_total_members_count($atts)
    {
    return your_function_name();
    }

    Then you can use the following shortcode to display the output of the your_function_name() function:

    [wp_eMember_display_total_members]

    remember you should not put any echo in the “your_function_name”. You should add all the output string to a variable then return it.

    May 7, 2010 at 10:07 am #20396
    nicoolas
    Member

    Hi,

    I totally lost…..

    I’ve try to :

    insert the code to the “wp_eMember1.php” but nothing happen. I don’t know where insert the code.

    So, I insert this :

    add_shortcode(‘wp_eMember_display_total_members’, ‘wp_eMember_display_total_members_handler’);

    function eStore_remaining_copies_counter($atts)

    {

    return show_total_members();

    }

    BUT I’m not sure about the “function_name”.

    I’m not a geek and php isn’t my favorite branch matter….

    I tink that the php code is : <?php echo $wp_total_members[0]->count; ?>

    So I don’t know ‘changing’ like an output string…

    sorry, I’m really bad in programmation

    nicolas

    May 8, 2010 at 12:55 am #20397
    amin007
    Participant

    LOL… okay my co-developer of this plugin has added a shortcode for you that can be used to display the total number of members.

    You can either use the following shortcode on a post or page:

    [wp_eMember_total_members]

    or use the following PHP code to display the total members from your theme’s template file:

    <?php echo emember_get_total_members(array()); ?>

    I have sent you an updated version of the plugin.

    May 8, 2010 at 7:20 am #20398
    nicoolas
    Member

    Many thanks.

    I’m blown away. I never seen a support like yours.

    It’s like “open source”. We give some ideas and you do it. Resultat : the most complete WP plugins that I’ve never seen.

    Best Best regard,

    nico

    May 8, 2010 at 6:58 pm #20399
    nur
    Member

    it feels great to have such comments. It inspires us a lot :)

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ