WordPress.org

Forums

[Plugin: mycred] Get echo $users and echo $balance (1 post)

  1. xblackbonex
    Member
    Posted 1 year ago #

    hello guys,
    I need to get the number of users in another page outside of blog pages and I also need another page that do echo $balance that will show the balance of the logged user :) please help I tried these ones but both are giving errors :(
    users.php:

    <?php
    $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users");
    echo $users
    ?>

    balance.php:

    <?php
     if(function_exists('cp_displayPoints') && is_user_logged_in() ) { cp_displayPoints($user->ID); echo ' Store Credit points!';
     ?>

    help me please :)
    thanks,
    have a nice day.

Topic Closed

This topic has been closed to new replies.

About this Topic