AM Events
The purpose of this plugin is to add an event type similar to the normal post type. By design this plugin doesn’t provide any ready-made layouts, and allows the events to be fully integrated and customized to the theme of your choosing. Current Features Admin pages to view/create/modify events. Available data fields for events: start date, end date, venue, category Create weekly or biweekly recurring events Fully customizable widget for displaying upcoming events. The custom post type created by the plugin is named ‘am_event’ and has two taxonomies: ‘am_event_categories’ and ‘am_venues’. Dates are stored as post metadata. Displaying the events is done in the theme files using WP_Query and the template tags provided by the plugin. This allows full control over the layout and what elements to show. The widget for displaying upcoming events uses a simple template system for full control of the layout. If you think something critical is missing, feel free to send me a request. The plugin is available in the following languages (pot-file included for additional translations): English French Norwegian Finnish TUTORIAL For integrating AM Events to an existing theme, I suggest creating a child theme with custom page templates. You can find an example of a working Twenty Twelve child theme from https://github.com/attemoi/am-events-child-theme containing three different page templates for event pages. Widget Here are the shortcodes available in the upcoming events widget template. [event-title] [start-date] [end-date] [event-venue] [event-category] [content] [thumbnail] [excerpt] [permalink] [meta] Conditional shortcodes: [if cond=”startdate-is-enddate”] [if cond=”startdate-not-enddate”] [if cond=”startday-is-endday”] [if cond=”startday-not-endday”] [if cond=”has-venue”] [if cond=”has-category”] The title can be linked to the event post with the ‘link’ attribute, e.g. [event-title link=true] The category and venue can also be linked similarly to their respective archive pages using the ‘link’ attribute, e.g. [event-category link=true] The number of words displayed in the title, content or excerpt can be limited by the ‘limit’ attribute, e.g. [content limit=25] or [event-title limit=10]. The dates can be formatted using the ‘format’ attribute, e.g. [start-date format=’d.m.Y H:i’] (see PHP date for formatting options). If no format is given, the default WordPress date format is used. You can use any shortcode as many times as needed in a single template. To separate date and time of start date for example you could write: [start-date format='d.m.Y'] divider [start-date format='H:i'] Example usage of conditional shortcode: [start-date format='D d.m.Y H:s'] [if cond='startdate-not-enddate'] - [end-date format='D d.m.Y H:s'] [/if] Template tags Template tags were introduced in version 1.3.0 and are listed below. More documentation can be found in the source files. // Template tags for getting and displaying event dates am_the_startdate($format = 'Y-m-d H:i:s', $before = '', $after = '', $echo = true) am_get_the_startdate( $format = 'Y-m-d H:i:s', $post = 0 ) am_the_enddate($format = 'Y-m-d H:i:s', $before = '', $after = '', $echo = true) am_get_the_enddate( $format = 'Y-m-d H:i:s', $post = 0 ) // Template tags for getting and displaying event venues am_get_the_venue( $id = false ) am_in_venue( $venue, $post = null ) am_get_the_venue_list( $separator = '', $parents='', $post_id = false ) am_the_venue( $separator = '', $parents='', $post_id = false ) // Template tags for getting and displaying event categories am_get_the_event_category( $id = false ) am_get_the_event_category_list( $separator = '', $parents='', $post_id = false ) am_in_event_category( $eventCategory, $post = null ) am_the_event_category( $separator = '', $parents='', $post_id = false ) Example of displaying the first category of the current event post: $categoryArray = am_get_the_event_category(); echo $categoryArray[0]->name; Creating a WP_Query The custom post type is named ‘am_event’ The taxonomies are named ‘am_venues’ and ‘am_event_categories’. The event post has metadata named ‘am_startdate’ and ‘am_enddate’ that are formatted like ‘yyyy-mm-dd hh:mm’ So suppose I wanted to display all events with a category of ‘other’ and venue ‘mcdonalds’. I would then make a WP_Query like this: $args = array( 'post_type' => 'am_event', 'post_status' => 'publish', 'tax_query' => array( 'relation' => 'AND', array( 'taxonomy' => 'am_venues', 'field' => 'name', 'terms' => 'mcdonalds', ), array( 'taxonomy' => 'am_event_categories', 'field' => 'name', 'terms' => 'other' ), ), ); $the_query = new WP_Query($args); if ($the_query->have_posts()) { while ($the_query->have_posts()) { $the_query->the_post(); $postId = $post->ID; // Use template tags to get start and end date $startDate = am_get_the_startdate('Y-m-d H:i:s'); $endDate = am_get_the_enddate('Y-m-d H:i:s'); // Use template tags to get venues and categories in an array $venues = am_get_the_venue( $postId ); $eventCategories = am_get_the_category( $postId ); // All the other functions used for posts like // the_title() and the_content() work just like with normal posts. // ... DISPLAY POST CONTENT HERE ... // } } If you want the events ordered by start date, add the following to $args: 'orderby' => 'meta_value', 'meta_key' => 'am_startdate', 'order' => 'ASC', If you need to display only upcoming events, add the following meta_query argument to $args: 'meta_query' => array( array( 'key' => 'am_enddate', 'value' => date('Y-m-d H:i:s', time()), 'compare' => ">", ), ), The plugin folder also contains a file “examples.php”, which contains an example function for displaying upcoming events in a table.
Simple Calendar – Google Calendar, Events, & ICS Feeds
Simple Calendar shows your events on your WordPress site, whether they live in Google Calendar, another calendar app that supports the iCalendar (ICS) format, or WordPress itself. No coding, no iframe embeds, and no hassle of maintaining the same events twice. Start with the free plugin for clean grid, list, and mobile-friendly widget views. When your site needs more enhanced features, add only the addons you’ll actually use, or save big with Simple Calendar bundle pricing plans → Choose your event source Simple Calendar started as a Google Calendar plugin. Many of our users asked for more sources so they wouldn’t have to switch plugins, so the free plugin now supports more event sources. Google Calendar Choose to display any public Google Calendar using a Google API key. It keeps your calendars in sync as you update, edit, or delete events in the source, i.e., Google Calendar. Other calendar apps (ICS) You can now import events from any external calendar application other than Google Calendar via an ICS file, including Microsoft Outlook, Microsoft 365, Apple iCloud Calendar, Yahoo Calendar, Zoho Calendar, Proton Calendar, and more. Events created in WordPress If you’d rather not rely on an external calendar app, Simple Calendar lets you create custom events directly in WordPress. It doesn’t require an external calendar source and lets you create and manage events in WordPress, then display them in a calendar format on your website. See Simple Calendar live in our interactive demos → Simple Calendar free core plugin features Flexible event sources & creation Display any public Google Calendar Import ICS files from Outlook, Microsoft 365, Apple Calendar, or any iCalendar app Create events directly in WordPress Combine several calendars into one view, by calendar or by category Let visitors add events to their own Google Calendars Customize your calendars Responsive monthly grid, list views, and mobile widget views Event and text colors to match your site Use event template tags to customize your event information, such as title, time, location, etc. Timezone, date format, and start-of-week setting Integrates with Event Calendar Newsletter to turn events into newsletter-ready content. Keeps your site loading speed fast as is Place calendars with a shortcode or widget Export your events as an ICS file Scripts and styles load only on pages that include a calendar Regular updates and security maintenance Explore our premium addons to do more with Simple Calendar Google Calendar Pro Show private Google Calendars without making them public or searchable Connect in one click with secure Google sign-in OAuth, or use your own API key Add a live ICS feed URL that stays in sync as you update events in your calendar app Carry over the event colors you set in Google Calendar Show event images when visitors hover over an event Access more customization options to match your site FullCalendar Extended (Built on open-source FullCalendar library) Interactive month, week, and day views visitors can switch between in one click Show the calendar in your visitors’ language Settings for calendar height, timezone, event colors, and event text colors Limit how many events and which hours are shown Book an Appointment (Lighter alternative to full booking plugins, for anyone who only needs synced appointments with Google Calendar) Set your available booking slots Visitors book open slots right on your site Each booking appears in both your Google Calendar and your visitor’s Booked slots hide automatically to prevent double bookings Need more than one addon? Compare bundle plans, as they include multiple addons for less than buying them separately. Who it’s for Simple Calendar plugin is for anyone who keeps their schedule in a calendar app, or wants to keep it in WordPress, and needs it on their website without maintaining it twice. Churches publishing service times and ministry schedules Tutors, coaches, and trainers showing availability and taking bookings Studios, venues, and rentable spaces showing what’s booked and what’s open Schools and educators posting class schedules and term dates Nonprofits and community groups sharing event calendars Small businesses showing opening hours, workshops, and team schedules Remote teams sharing calendars on intranets and private portals Agencies and freelancers who need a calendar that works on any client site Documentation, support, and more resources Read our documentation to learn more about setup, customization, and how to access newly launched features. Watch step-by-step video tutorials to explore Simple Calendar’s setup, features, and other capabilities in action. View our live, interactive demos and play with different features to see how they look on real sites. Contact our responsive support team if you’re stuck on anything related to setup, further customization, or any other issue. Connect with us on Instagram, Facebook, X, and LinkedIn to learn more about the plugin’s possibilities and get early access to discounts. Please feel free to ask your questions in our community support forum. Contribute to code, submit pull requests, or report bugs on GitHub. Help add or update a Simple Calendar plugin translation.