Support » Plugins » EventCalendar – customized listing example and i need some help

  • Resolved nearlythere


    i’m pulling my hair out trying to get an event listing working the way i need to, but i cobbled this together and someone else might find it handy. so i’m offering this code here and asking for help from anyone who can…


    this code will let you make a tabular listing of events which your users may find easier to scan visually.

    1- first you need to install EventCalendar 3.0 (honestly i have tried loads of future posts plugins, but this seems to work… though i don’t need the calendar).

    2- create a category-X.php archive,… X being the ID of whichever category you have assigned to the EventCalendar plugin options. more about category templates here:

    where you have the loop, paste in this code:

    <?php query_posts('cat=2&year=2006'); ?>
    <h3>List of Events for 2006</h3>
    <table width="100%" border="0" cellpadding="3" summary="Event Listing">
    <tr align="left" valign="top">
    <th width="20%">Title</th>
    <th width="60%">Description</th>
    <th width="20%">Start Date </th>
    <?php while (have_posts()) : the_post(); ?>
    <tr align="left" valign="top">
    <td><?php the_title(); ?> <?php edit_post_link('edit this', '', ''); ?></td>
    <td><?php the_content(); ?></td>
    <td><?php the_date(); ?></td>
    <?php endwhile; ?>

    this is how it looks: but this link is liable to go out of date within the next few hours, (i’m still playing around!) My events category is called ‘what’s on’ and the sub categories are ‘fesivals’ and ‘events’ in case that is confusing.

    You may note that if you have your events category, and sub categories, you can separate the display of each sub-category. but it will ONLY display within the main events category pages.

    therefore, if:

    [1] Events
    — [2] first subcategory
    — [3] another subcategory

    you only need to copy the code above again, and change the query:

    <?php query_posts('cat=2&year=2006'); ?>
    … etc


    <?php query_posts('cat=3&year=2006'); ?>
    … etc

    Can you Help?

    What i would LIKE to be able to do is have pages for the years under each subcategory…

    *AND* have the month headers:


    Title | Desc | Date


    Title | Desc | Date

    does anyone have more familiarity with displaying future posts? i can’t figure out how it works, or how to get it working on only specific categories…

  • The topic ‘EventCalendar – customized listing example and i need some help’ is closed to new replies.