[EventCalendar] Hide Post Timestamp

Steve Winton stevewinton at gmail.com
Tue Jan 2 11:01:06 UTC 2007

Hi Marc

You could either edit your theme's loop, and put a conditional statement
around calls to 'the_date()', checking for the post category before
displaying it. However, since the_date() could be called from multiple
places in your theme, you may want to use a filter on 'the_date' and
'the_time', which is what I've done, something like:

function 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', 'filter_the_date');
add_filter('the_time', 'filter_the_date');

Note, that I'm using the event schedule in place of the date the event was
created. You could just set $the_date to an empty string to hide it
completely. You could either stick the above in your theme's
functions.phpfile, or create a plugin.

Hope that helps,

On 1/1/07, Marc Griffin <marc at overallquilter.com> wrote:
>  Hello,
> I would like to hide the post timestamp for posts in the calendar event
> category only (the timestamp for when the event was created … the one above
> the event date in the red box). I've searched the archives for a solution
> with no luck.
> Thanks!
> _______________________________________________
> Blog: http://wpcal.firetree.net/
> EventCalendar at firetree.net mailing list
> Unsubscribe: http://penguin.firetree.net/eventcalendar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20070102/44a98a05/attachment.html

More information about the EventCalendar mailing list