WordPress plugin intelligence profile

AM Events

Manage and display your events. Allows fully customizable layouts and includes a widget for upcoming events.

WP PlugIndex snapshot

Current directory snapshot

Tested up to WordPress 4.8
Current version1.13.1
WordPress coverageTested up to WordPress 4.8
Minimum stackWP 3.3.1 · PHP —
Directory statusactive
Last directory update14 Nov 20178y ago
Active installations80Adoption metric — not a quality score
WordPress.org rating4.7 / 5 from 7 ratings
Official packageDirect from WordPress.org

Repository metrics are context, not quality scores. Active installations measure adoption and can strongly reflect a plugin’s age and historical popularity. Ratings, recent updates and “Tested up to” metadata also do not guarantee modern code, error-free operation, security, feature completeness or suitability for a particular site. Why active installs don’t tell the whole story →

WP PlugIndex currently records AM Events version 1.13.1 as active, updated 8y ago and tested up to WordPress 4.8.

Overview

About this plugin

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. 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”]

g. [event-title link=true]

g. [event-category link=true]

g. [content limit=25] or [event-title limit=10].

g. 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:

Y'] <span>divider</span> [start-date format='H:i']

Example usage of conditional shortcode:

Y H:s'] [if cond='startdate-not-enddate']

  • [end-date format='D d.m.Y H:s']

[/if]

Template tags

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;<h3>Creating a WP_Query</h3>

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' => ">", ), ),

php”, which contains an example function for displaying upcoming events in a table.

WordPress.org metadata

Plugin tags

Topics listed for this plugin in the WordPress.org directory.

  • calendar
  • dates
  • event
  • events
  • venue
Compatibility & maintenance

Compatibility & maintenance

Tested up to WordPress 4.8

Not yet marked as tested with WordPress 7.1. WordPress.org currently lists Tested up to 4.8.

Current WordPress releaseWordPress 7.1
WordPress.org Tested up to4.8
Minimum requirementsWordPress 3.3.1 · PHP not listed
Update activity14 Nov 20178y ago

“Tested up to” is directory metadata supplied by the plugin author. WP PlugIndex does not turn an older declaration into a claim that the plugin is incompatible.

Changes recorded by WP PlugIndex

Recent tracked changes

No tracked version or compatibility changes have been recorded by WP PlugIndex yet.

Tracking & source

WP PlugIndex tracks public WordPress.org directory metadata and records selected version, compatibility and availability changes as they are detected.

Plugin watchlist

Watch this plugin

Sign in to your WP PlugIndex account or create a free account. Free accounts can watch up to 5 plugins and see what changed.

Watch limit

Watchlist limit reached

You have reached your current active watch limit.