• Active can mean “the author have posted in last 24 hours”
    The ultimate goal is to build a page listing all the authors like these websites:
    1. https://www.honeyee.com/blog/
    2. https://hypebeast.com/blog/
    3. https://clotinc.com/
    4. https://think-silly.com/chronicles/

    Any plugin or custom code can do this?

    Below is my code working on this so far…

    <?php
    global $wpdb;
    $recentAuthors = $wpdb->get_results("SELECT post_author, max(post_date) as postdate FROM wp_posts WHERE post_type = 'post' AND post_status='publish' AND WEEK(post_date) = '$thisweek' GROUP BY post_author ORDER BY postdate DESC LIMIT 5");
    
        foreach ($recentAuthors as $recentAuthor) {
            $userId = $recentAuthor->post_author;
    echo get_avatar($userId, 128, $default, $alt );
        }
    ?>

  • The topic ‘How to filter active Author's Avatar?’ is closed to new replies.