Support » Plugin: Calendar » 2 Calendars on a site

  • Resolved jabbamonkey


    Is there a way to allow for 2 calendars on the site?

    I’m using the plugin:
    … but it seems to only allow for a single calendar. (I need a second calendar on the same site for something else).

    I’m assuming it’s not as easy as creating a new folder in my plugins called ‘calendar2’ and adding the same calendar plugin inside there…

    I’d think that you’d need to modify some things in the script … such as creating a second calendar “table” to store the new calendar’s information. Modifying the queries to store data into this table. Creating a new admin tab (not calendar, but maybe calendar2).

    Is this something someone else has easily done? Please let me know.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m playing with this right now as well – haven’t found a plugin yet that will allow two instances. even tried making a copy and changing the files but still no joy. i think i will have to use two different plugins to achieve this unless someone else has any ideas?

    I thought it could be as simple as duplicating the plugin in another folder (i.e. calendar2) and then changing some of the variables in the
    calendar.php page…. I haven’t tried it yet, as I have a ton of other problems with my site now.

    Not sure if it will work…

    LINE 28

    // Enable internationalisation
    $plugin_dir = basename(dirname(__FILE__));
    load_plugin_textdomain( 'calendar2','wp-content/plugins/'.$plugin_dir, $plugin_dir);
    // Define the tables used in Calendar
    global $wpdb;
    define('WP_CALENDAR_TABLE', $wpdb->prefix . 'calendar2');
    define('WP_CALENDAR_CONFIG_TABLE', $wpdb->prefix . 'calendar2_config');
    define('WP_CALENDAR_CATEGORIES_TABLE', $wpdb->prefix . 'calendar2_categories');

    LINE 117

    if (function_exists('add_menu_page'))
           add_menu_page(__('Calendar2','calendar'), __('Calendar2','calendar'), $allowed_group, 'calendar', 'edit_calendar');


    the way I solved it for our site is to make use of the calendar categories.

    You can have a calendar show only one category like this:


    Then, only events of category 2 will display in the calendar.

    Note, that you cannot have two calendars on the same page/post in wordpress, each showing two different categories. The reason for this is that the plugin makes a global search/replace on the page, replacing the tag {CALENDAR;2} with the actual calendar HTML. I made a fix for this, allowing you to have more than one calendar on the same page, each with its own category.

    The code for that is on Kieran’s forum.

    Hope this helps!

    Plugin Author Kieran O'Shea


    Marking the above solution as correct. Thanks rfroberg 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘2 Calendars on a site’ is closed to new replies.