[EventCalendar] Create Page with Events Only

Steve Winton stevewinton at gmail.com
Mon Feb 26 09:23:17 UTC 2007


That would be me...

http://penguin.firetree.net/pipermail/eventcalendar/2007-January/001306.html

*takes a bow*

On 2/24/07, Matt Dawson <matthewtdawson at gmail.com> wrote:
> So here it is. My apologies to whomever wrote this function - I can't find
> it on the mailing list archive.
>
> Take the following code and save it in your theme's folder as functions.php.
> If a functions file already exists, just paste it into that doc.
>
> <?php
>
> function mg_filter_the_date($the_date)
> {
>   $event_cat = get_option('ec3_event_category');
>   if (in_category($event_cat) || is_category($event_cat))
>   {
>     $the_date = ec3_get_schedule('%s ','%1$s %3$s %2$s. ','%s');
>   }
>   return $the_date;
> }
>
> add_filter('the_date', 'mg_filter_the_date');
> add_filter('the_time', 'mg_filter_the_date');
>
> ?>
>
> This looks at the event category for your site, and if the post in question
> is in that category, it calls ec3_get_schedule and reassigns that info as
> the posts date/time. Of course, this means that you can't access the post
> date anymore. So if you have a situation where you need to show both the
> event date and the post date, this isn't a viable option.
>
> If you're the original author, stand up and be thanked. I owe you one.
>
> Matt
>
>
> On 2/23/07, Michael Schumann < lanval at gmail.com> wrote:
> >
> >
> > Hi Matt,
> >
> >
> > If you could post this trick that would be great! :)
> >
> >
> > Michael
> >
> >
> > On 23-Feb-07, at 3:57 PM, Matt Dawson wrote:
> >
> > It's worth noting that I'm also using a function in my theme that
> substitutes event date info for post date info for any post marked with my
> events category. This allowed me to snag the event date by calling
> the_time(). I got that trick from this mailing list, but I can repost if it
> would be helpful to others.
> >
> > _______________________________________________
> > Blog: http://wpcal.firetree.net/
> > EventCalendar at firetree.net mailing list
> > Unsubscribe: http://penguin.firetree.net/eventcalendar
> >
> >
>
>
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar
>
>



More information about the EventCalendar mailing list