[EventCalendar] Using WordPress Tags with Event Calendar v3.2.beta2

Iain K. MacLeod imac at boostventilator.com
Fri Jan 23 14:16:48 UTC 2009


This might be of use to some people, depending on what theme you use
(I am using http://www.plaintxt.org/themes/sandbox/) and your settings
(I "Keep Events Separate" and am modifying a separate a template file
for the Calendar category).

In my case, I am using Tags as "regions" for my calendar and I ended
up having to replace this included code that automatically generates
the Tag links in the Sandbox template for WordPress:

<?php the_tags( __( '<span class="tag-links">Region: ', '' ), ", ",
"</span>\n\t\t\t\t\t<span class=\"meta-sep\"></span>\n" ) ?>


...with these lines of code in order to get the generate the Tags and
specifically call Events by appending "&ec3_listing=events" from the
Advanced Queries section
(http://wpcal.firetree.net/advanced-queries/):

<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo '<a href="http://yourdomain.com/wordpressdir/?tag=' . $tag->slug
. '&ec3_listing=events">' . $tag->name . '</a>';
}
}
?>

Just thought I would share if anyone else was trying to do a similar thing.

- Iain

--
 Iain K. MacLeod
 http://boostventilator.com
 Boost Ventilator Consulting



More information about the EventCalendar mailing list