[EventCalendar] Hide Post Timestamp

Marc Griffin marc at overallquilter.com
Tue Jan 2 16:48:31 UTC 2007


Hi Steve,

 

It works beautifully as a plugin . returning the date of the event instead
of the creation date. Forgive me, but I'm not a developer ... how would I
set $the_date to an empty string so that I can hide it completely?

 

Thanks for your help!

 

Marc

 

  _____  

From: eventcalendar-bounces at firetree.net
[mailto:eventcalendar-bounces at firetree.net] On Behalf Of Steve Winton
Sent: Tuesday, January 02, 2007 6:01 AM
To: Support for EventCalendar plugin
Subject: Re: [EventCalendar] Hide Post Timestamp

 

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.php
file, or create a plugin.

Hope that helps,
Steve

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/fdc0120b/attachment.html


More information about the EventCalendar mailing list