ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Showing the two most recent posts (newbie question)

June 15, 2011 12:21am

Subscribe [3]
  • #1 / Jun 15, 2011 12:21am

    Hey peeps! This is probably a newbie question, but if anyone can point me in the right direction. I haven’t found any answers on the forum myself.

    I have a channel where I am trying to display the two most recent entries, sorted by a date custom field.

    {exp:channel:entries channel="fixtures" status="open|Played" orderby="game-date" sort="asc" limit="2"}

    What happens, is rather than get the two most recent posts, relative to today, is that the first two show up.

    I’ve got posts for June 6, June 8 and June 13. The posts from June 6 and June 8 are showing up, but I want the posts from June 8 and 13 to show up.

    Any help is great, thanks!

  • #2 / Jun 15, 2011 12:58am

    Hi Todd, I think you should use ‘DESC’ in the parameter ‘sort’

    Srikanth

  • #3 / Jun 15, 2011 7:30am

    John Henry Donovan

    12339 posts

    Hi Todd,

    Welcome to the forums 😊

    If you set your sort to desc as srikanth suggests does it work as expected

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases