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.

orderby="date" regardless of category

February 12, 2010 10:04am

Subscribe [1]
  • #1 / Feb 12, 2010 10:04am

    PostScript

    7 posts

    I have a blog home page where I want to show the latest 6 entries listed by date, regardless of category. I have this code:

    {exp:weblog:entries weblog="blog" orderby="date" sort="asc" limit="6"}

    But the output shows by category, then date. How do I get it show by date as the primary?

  • #2 / Feb 19, 2010 12:42pm

    PostScript

    7 posts

    Figured out my problem (duh moment). I created a custom field ‘entry-date’ for the blog because we were back dating blog entries to pre-populate the new blog. I wasn’t using the custom field name to order by, so it seemed that the categories were messing up the entries, but it was just coincidence. The listings were by actual creation date and not the entry-date field.

    Correct code is:

    {exp:weblog:entries weblog="blog" orderby="entry-date" sort="desc" limit="6"}

    Phew!

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

ExpressionEngine News!

#eecms, #events, #releases