WordPress Events Calendar

Not happy with current offerings, I created a plug to add an events calendar to my client’s sites.  You can check out the demo events calendar here.

A few features:

  • Many types of repeating events.
  • Easy to set up.  Let the plugin know what page name you want to use and your good to go.
  • Exclude events from certain dates every year such as holidays.  You can also include dates to an event if it doesn’t fall on a specific repeat pattern.
  • Each event has its own page.  Great for SEO and direct linking to events for more information.
  • Add unlimited events.  Great for fitness centers, schools, organizations, and companies.
  • Create categories for easy viewing and sorting.
  • Automatic print view to for easy printing and saving ink.

Please let me know if you find any bugs or have some suggestions.  I’ve built it from the requirements of my clients and am always looking to improve it.

Install

  • Unzip the `cgm_calendar.zip` file.
  • Upload the the `cgm_calendar` folder (not just the files in it!) to your `wp-contents/plugins` folder. If you’re using FTP, use ‘binary’ mode.

Activate

  • In your WordPress administration, go to the Plugins page
  • Activate the CGM Calendar plugin and a subpage for CGM Calendar will appear in your Settings menu and also as its own menu.

Display

There are three ways to show the calendar on your site.

  • Go to Settings -> CGM Calendar and change the settings to what to you.  Set the page name to the url you want to display the calendar and visit http://www.yoursiteurl.com/pagename and it will appear. No page or post creation required
  • Add the short code [ cgm-event-calendar ] (with no spaces) to your page or post content you wish to display the calendar
  • Use the php function call <?php cgm_event_calendar(); ?> to display the calendar where you wish.

To display upcoming events:

  1. Go to Settings -> CGM Calendar and set the Calendar URL to the full url where the calendar resides.  Default would be http://www.yoururl.com/calendar
  2. Modify the List Format setting if desired.  Note that you will still need to wrap any list in a ul/ol when called.
  3. Use the function echo cgm_list_upcoming_events(array(‘num_events’ => 5, ‘tag_id’ => ‘1,2’)); and change the num_events to how many you want to show and the tag_id list to the tagged events, or remove it to show all.
  4. You may also use the short code [ cgm-upcoming-events num_events=10 tag_id=1,2 ] to display the list.

If you wish, you can override the default css and print view template by copying the files, css/calendar.css and print_view.php to the base of your template directory.

Settings

Go to Settings -> CGM Calendar

  • Page Name – Sets the default url to display the calendar with no page or post creation required
  • Default View – Sets the default view of the calendar, by Month or Week when visitors view your calendar
  • Start Time – Sets the time that the weekly calendar will start on.  If you set the start time for 8am and have an event at 7am, the event will not show on the weekly calendar.
  • End Time – Sets the time that the weekly calendar will end on.  If you set the end time for 5pm and have an event at 6pm, the event will not show on the weekly calendar.

Download it here.

If you like the plugin, do me a favor and rate it too!

If you have trouble with the plugin, please make sure you reread the directions above before leaving a comment.  If you do make a comment about an issue you are having, please provide as much detail as you can about the issue and what you’ve done.  Saying it doesn’t work, doesn’t help and your comment will go unanswered.

If you would like custom additions / changes, please use my contact form to inquire about freelance services.

Thanks!

261 Responses to “WordPress Events Calendar”

  1. Peter says:

    Is it possible to place the short code for “upcoming events” on a different web site (in addition to the one where the calendar resides)?
    Thanks.

  2. JoseH says:

    In our blog we are using WP Super edit instead of wp_tiny_mce. So we get PHP error when displaying the “Calendar” and “CGM calendar” tabs in the WP admin console.

    To solve this issue i changed line 179 in cgm_calendar.php fom:
    if (function_exists(‘wp_tiny_mce’)) wp_tiny_mce();

    into
    if (function_exists(‘wp_super_edit’)) wp_super_edit();

    Maybe it could help to add a condition / function that identify the visual editor used

  3. JoseH says:

    But most of the job is done:

    1) Add at the top of the cgm_calendar.php file te following
    $plugin_dir = basename(dirname(__FILE__));
    load_plugin_textdomain( ‘cgm_event_calendar’, null, $plugin_dir );

    2) Use Poedit du translate (for me in french) the default.po file

    3) Generate a mo file (for me cgm-event-calendar-fr_FR.mo)

    That’s all. Most of the pages is now translated.

    I can provide the file if requested

  4. Ryan says:

    Spud, you can accomplish this with CSS by floating, padding or margin or modify the list settings under CGM Calendar.

  5. Ryan says:

    JoseH, thats something many people have requested but I do not have time to accomplish.

  6. Ryan says:

    Snowboardmommy, in the installation directions, I mention to split out the calendar.css file into your themes folder so that doesn’t happen.

  7. JoseH says:

    Hello what about internationalisation of your plug-in?
    Although there is a default.po file all the text is hard coded in the php file.

  8. It would also be helpful if you would PLEASE, please please separate the colors/css from the coding. When I upgraded, I had to re-do all of the colors to make them match my theme again … I really don’t think that those colors needed to be reset. THANKS!

  9. Candace says:

    Hi,
    I love this calendar, it’s exactly what I needed for my site, but I need to change the colors. It currently has a yellow and blue color combo, and I need to change it to a gray and white combo. How do I do that?

  10. Robin says:

    It would be great if there was an option to hide the event time.

  11. Hi! Thanks for the great plugin, this is exactly what I was looking for. I have one question though, when I list the upcoming events in my widget sidebar wth [cgm-upcoming-events] – there is no space between the event title and date for when it will happen. For example, it appears like this on my site:

    Sample Event12/21 12:00 am

    Is there a way I can change the CSS to add a space between the date and title?

Leave a Reply