[EventCalendar] Secondary Category

John Charlton jc at leafwalk.co.uk
Sun Aug 17 11:20:42 UTC 2008

Hi Mailing List,

I made some small adjustments to the calendar plugin to accommodate my  
needs for a secondary category. They are a little bespoke, but should  
not need to be changed too much to be more widely useful for others.  
(i have hard coded the category ID 5 as that is what i needed... will  
try to change this to a variable when i get chance.)

I thought it could be helpful to someone and maybe a starting point  
for future functionality.

Thanks for the plugin, it has been very useful on http://www.chosenhillrfc.co.uk 
  for displaying fixtures etc,

Thanks again,


 From template_functions.php

@ line 343

function ec3_get_events(
   $secondcat	 =5,
   $template_day  =EC3_DEFAULT_TEMPLATE_DAY,
   $date_format   =EC3_DEFAULT_DATE_FORMAT,
   $month_format  =EC3_DEFAULT_MONTH_FORMAT)

@ line 380


   // Find the upcoming events.
   $calendar_entries = $wpdb->get_results(
        p.id AS id,
        u.$ec3->wp_user_nicename AS author,
      FROM $ec3->schedule s
      LEFT JOIN $wpdb->posts p ON s.post_id = p.id
      LEFT JOIN $wpdb->users u ON p.post_author = u.id
      LEFT JOIN $wpdb->term_relationships r ON r.object_id = p.id
      LEFT JOIN $wpdb->term_taxonomy t ON t.term_taxonomy_id =  
      WHERE p.post_status='publish'
        AND end>='$ec3->today' $and_before
        AND t.term_id = $secondcat
      ORDER BY start $limit_numposts"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://penguin.firetree.net/pipermail/eventcalendar/attachments/20080817/c430b0ab/attachment.htm

More information about the EventCalendar mailing list