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

  • SEARCH
  • Home
  • 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 6356553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:59:10+00:00 2026-05-24T22:59:10+00:00

How would I order the latest 3 entries from a channel with each entry

  • 0

How would I order the latest 3 entries from a channel with each entry from a different author? (so they don’t end up being 3 latest entries by the same author) – I think I need to use an SQL Query for it?

{exp:channel:entries orderby="screen_name|date" channel="portfolios" limit="3" group_id="5" dynamic="no"}
<img src=" {thumbnail}" alt="{title}"/><br />
{title}<br />
{/exp:channel:entries} 

Thanks in advance!

  • 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-24T22:59:11+00:00Added an answer on May 24, 2026 at 10:59 pm

    Mark – here’s a repost of the answer I posted on the other dupe question:


    The best approach here, since you need your custom fields parsed, is to first find the entry_ids of the latest 4 entries from distinct authors, and then pass those to the channel:entries tag through an embed using the entry_id parameter.

    This should work (be sure to replace the channel_id with the appropriate integer). Replace your entire current chunk of code with this:

    {embed="embeds/_latest_per_member" entry_ids="{exp:query sql="SELECT entry_id, author_id FROM exp_channel_titles WHERE entry_date IN( SELECT MAX(entry_date) FROM exp_channel_titles  WHERE status != 'closed' AND channel_id = 1 GROUP BY author_id ) ORDER BY entry_date DESC LIMIT 4" backspace="1"}{entry_id}|{/exp:query}"}
    

    Then your embeds/_latest_per_member template can look something like this:

    {exp:channel:entries channel="channel_name" entry_id="{embed:entry_ids}"}
        {author_id}<br />
        <a href="{path=portfolios/gallery/{username}}"><img src="{thumbnail}"></a><br>
        <a href="{path=portfolios/gallery/{username}}">{title}</a><br />
    {/exp:channel:entries}
    

    You had mentioned that this code gave you a recursive error – that means that you’ve put another call to the embed within the embed. Don’t do that.

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

Sidebar

Related Questions

I would like to change the order of names from Last, First to First
I'm trying to SELECT from two tables and ORDER BY date (a column they
I would like to order contents in a column when user clicks column header.
I would like to order by date and then team in a MySQL query.
In order to debug I would like to dump certain variables on to my
I would like to calculate total order amount in the previous month. I got
I would like to calculate my total order amount in the previous week. I
How would one follow the proper steps in order to license a package under
I would like to define the z order of the views of a RelativeLayout
I would like to sort an array in ascending order using C/C++ . The

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.