widget coding :: orderby not working
-
I have a widget that is working but it orders results by the end date and not the start date. I use custome variables to set the start date (startDate) and end date (endDate) when creating a post. the site is https://pleinairbc.com
The original code was:
query_posts('showposts=20&category__and(events_paid,events_free)&meta_key=endDate&meta_compare=>=&meta_value='.$todaysDate.'&orderby=meta_key&order=ASC');
which you can see will order by the end date
I changed it to..
query_posts('showposts=20&category__and(events_paid,events_free)&meta_key=endDate&meta_compare=>=&meta_value='.$todaysDate.'&orderby=startDate&order=ASC');
thinking it would order by start date (startDate) but it still orders by end date.
Any ideas how I would get it to sort via the start date even though I compare with the end date?
- The topic ‘widget coding :: orderby not working’ is closed to new replies.