This is a simple event listing. I want the output to list by "touring date" which is a custom date field. However, it doesn't seem to work.

  {exp:channel:entries channel="touring_calendar" dynamic="no" orderby="touring_date_and_time" sort="asc"}
  <div class="touring-details">
    <h2 class="touring-city">{touring_city_state}</h2>
    <h2 class="touring-show">{touring_show_name}</h2>
    <h2 class="touring-venue">{touring_venue_name}</h2>
    <h2 class="touring-date"> {touring_date_and_time  format=" %F %j, %Y; %g:%i %a"}</h2></div>
  {/exp:channel:entries} 

It seems to be listed by "entry date" not the custom date field I created. I am stuck!

  • Well syntax seems good to me. You can raise a support ticket on Elislab – Mufi Oct 8 at 17:30
  • Can we assume the field type is actually set to "date"? – Jim Wyse 2 days ago

So I ran a test for you. I added a date field to a channel in my sandbox. I added this data to several entries. I can control the ordering based on that field with:

{exp:channel:entries channel="pages" orderby="datetest" sort="asc"}
{count} - {title}<br/>
{/exp:channel:entries}

This works as expected. You can watch the order flip when the sort parameter is changed.

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.