• I am using filter ‘fep_directory_arguments’ to set $args property because I want to display just some of the users in directory. Everything works fine except of total number of users which is displayed at top of the table.

    I have checked the code, I would suggest code change from:
    $result = count_users();
    to
    $result = $user_query->get_total();

    I think that makes more sense or did I miss something? 🙂

    https://ww.wp.xz.cn/plugins/front-end-pm/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    codex says $user_query->get_total() will Return the total number of users for the current query. But current query have number and offset so it should (i thought) return number of users of current page only.

    But now i test and see it return all users number not only current page users number.
    So you can use $total = $user_query->get_total();

    Thread Starter Stefan Felber

    (@scudai)

    Okay thank you.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Total users in directory’ is closed to new replies.