Thread Starter
Rhand
(@rhand)
I tried
get_posts("post_type=events&numberposts=-1&orderby=post_date('ASC')");
But clearly my syntaxis is off as it does not change a thing..
Thread Starter
Rhand
(@rhand)
This does seem to work. A hack, but one that does the trick:
get_posts("post_type=events&numberposts=-1&order=ASC&orderby=post_date");
Rhand, where did you add this?
Thread Starter
Rhand
(@rhand)
In template.php after $events = . So you get:
$events = get_posts("post_type=events&numberposts=-1&order=ASC&orderby=post_date");
Hi
You can order Events by “event start date” (most recent upcoming events on top).
Use this line of code in template.php:
$events = get_posts("post_type=events&numberposts=-1&meta_key=_event_start_date&orderby=meta_value&order=ASC");
Works for me…
I have no experience with php and frankly it scares me to change the code! As in, where exactly do you insert these snippets?
So this is my quick fix (go ahead and groan now..):
I just change the date and/or time the event is published in the Events list.
I really love this little sidebar calendar and wish that the developer could add all these fixes to get it to function correctly. The real shame is that it is so incompatible with other plugins using jquery.
You need to update template.php file (in your plugin directory).
Comment line number 4:
$events = get_posts("post_type=events&numberposts=-1");
and insert this code:
$events = get_posts("post_type=events&numberposts=-1&meta_key=_event_start_date&orderby=meta_value&order=ASC");
Thank you! I did replace that line successfully with your code. Much appreciated!