Home › Forums › Calendar Products › Events Calendar PRO › Event List Sort by Month Header
- This topic has 11 replies, 3 voices, and was last updated 12 years, 5 months ago by Rob.
-
AuthorPosts
-
December 1, 2011 at 8:22 pm #11637TerranceMember
Hi,
In event list view, each of the event has their own event start date, which is good.How can I get only the ‘Month’ for all the events that fall within that month instead of having the individual date for each event.
Something like this:
Jan
– Event 1
– Event 2
– Event 3
Feb
– Event 1
– Event 2
Mar
– Event 1Thanks in advance.
December 2, 2011 at 10:07 am #11661RobMemberThanks for the note, Terrance. That should be doable with a little hackery. Let me get our dev Jonah to chime in with his suggestions.
December 3, 2011 at 9:15 pm #11700TerranceMemberCool, looking forward to it.
December 5, 2011 at 8:16 am #11836RobMemberHey Terrance. I talked this over with Jonah. Looks like this is a rather complex task to do in WordPress alone, let alone with events. We are going to put together an FAQ/tutorial on this but it’s going to take some time to do – we’re aiming to get that published this week. Just wanted to give you a heads up since providing one-off hackery in this thread probably won’t be possible given the depth of work here. Apologies about that.
December 5, 2011 at 8:02 pm #11878TerranceMemberNo problem. Thanks for getting back.
Sure, I will look forward to the FAQ/tutorial. Let me know once it’s up. Thank you!
December 9, 2011 at 6:10 am #12044SeanMemberI achieved what your looking for with relative ease, thought I would post what I did since I read this thread first looking for a solution.
At the start of the loop after while statement in list.php I added:
<?php if($events_list_month == $events_list_current_month) { } else { echo '’ .$events_list_current_month. ”; }
?>
at at the end of the loop before the endwhile; I added:
I’ve not tested it fully, but it appears to be working on my installation.
December 9, 2011 at 6:12 am #12045SeanMemberThat didn’t work, trying again:
before loop:
$events_list_current_month_date_format = ‘F’;
$events_list_current_month = tribe_get_start_date( null, false, $events_list_current_month_date_format );if($events_list_month == $events_list_current_month) { } else { echo ” .$events_list_current_month. ”; }
After loop:
$events_list_month = $events_list_current_month;
In PHP tags obviously.
December 9, 2011 at 6:13 am #12046SeanMemberStill didn’t paste fully, oh well I tried.
December 9, 2011 at 6:16 am #12047SeanMemberOne last go
start of loop
<?php if($events_list_month == $events_list_current_month) { } else { echo '' .$events_list_current_month. ''; } ?>
end of loop
December 9, 2011 at 8:10 am #12053RobMemberHey Sean: thanks for this. We’re working to fix the forum so code pastes work fine here; in the interim, feel free to use pastie.org or something similar. Apologies for the inconvenience there.
December 15, 2011 at 7:58 pm #12402TerranceMemberAny update on this?
December 16, 2011 at 8:30 am #12435RobMemberWe’re still putting together our tutorial on the subject but got derailed due to the bugs that came up in 2.0.2. If Sean can confirm anything on his end, that may give us a workaround in the interim. But this is still in the works on our end and will certainly be up on the site by the end of the month.
-
AuthorPosts
- The topic ‘Event List Sort by Month Header’ is closed to new replies.