Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4017578
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:52:41+00:00 2026-05-20T09:52:41+00:00

I want to display users of wordpress as a table just like https://stackoverflow.com/users The

  • 0

I want to display users of wordpress as a table just like
https://stackoverflow.com/users

The recommended function is wp_list_authors, but it is not clear how can customise
the layout.

Say I want to display users in cells of table 5 x 5 with get next page link.

Please advice.

Let me explain a bit.

Unlike get_users_of_blog wp_list_authors does not return an array. If it would – then
having an array I can build any table using foreach. But wp_list_authors builds anchor tags on its own and returns monolith html block. The only option to control layout would be passing some sort before and after tags. But this function does not provide this sort of functionality.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T09:52:42+00:00Added an answer on May 20, 2026 at 9:52 am

    As far as i know, there’s no function like get_authors(), but you can do it by a raw SQL query in a custom template:

    Update: For pagination

    I’m not sure if you can use the built-in WordPress pagination to do that, as the paged param only appear to posts. You could fill a global $post var in a loop or something… There’s a lot of approaches, but let’s go for the “PHP” one. =D

    <?php
        $i = 0;
        $limit = 25;
        $offset = ($o = trim($_GET['offset'])) ? $o : 0;
        $users = $wpdb->get_results("SELECT user_nicename ... FROM {$wpdb->users} LIMIT $offset,$limit");
    ?>
    <?php foreach ($users as $user) : ?>
        <div class="someclass">
            <?php echo $user->user_nicename; ?>
        </div>
        <?php if ($i++ % $number_of_columns == 0) : ?>
            <div class="padder"></div>
        <?php endif; ?>
    <?php endforeach; ?>
    

    To simulate the table appearance, just float “someclass” left and put a fixed width on it. The “padder” div (float left and width 100%) will ensure that the cells will be aligned by the highest one in that row.

    And for the pagination links:

    <?php $n = $wpdb->get_var("SELECT count(ID) FROM {$wpdb->users}"); ?>
    <?php $o = $offset - $limit; ?>
    <?php if ($offset > 0) : ?>
        <a class="prev" href="?offset=<?php echo $offset - $limit; ?>">Previous</a>
    <?php endif; ?>
    <?php $o = $offset + $limit; ?>
    <?php if ($o < $n) : ?>
        <a class="next" href="?offset=<?php echo $o; ?>">Next</a>
    <?php endif; ?>
    

    Code from brain to keyboard. Not tested, again.

    Hope it helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to display tabular type data, but it will not be coming from
I want to display the TIME field from my mysql table on my website,
I want to display total number of user who only have posts at Wordpress.
In my rails app I'd like to let users submit custom themes to display
I want to suppress the web browser's default tooltip display when a user hovers
I want to display dates in the format: short day of week, short month,
i want to display some information in a listview using the GridView. i have
I want to display the current host and database names in a view. Where
I want to display a thumbnail image in a cell of tableViewController , this
I want to display some WPF elements near to the selected item of a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.