h-enk/event-manager

WordPress plugin that displays your events in a simple and flexible way.

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:wordpress-plugin

1.0.2 2019-05-09 19:24 UTC

README

Packagist Build Status

Powerful WordPress plugin that displays your events in a simple and flexible way.

Why

I created Event Manager for reuse in a number of projects. Similar, existing plugins on wordpress.org were either too complex or too rigid for my use cases. Event Manager gives you the freedom to make it completely your own. Event Manager is MIT Licensed. Use it to your liking!

Features

  • Add Events (custom post type) - Name, Description, Date, Start Time, End Time, Price, Event Categories, Venues, and Featured Image
  • Add Event Categories (custom taxonomy) - Name and Description
  • Add Venues (custom taxonomy) - Name and Description
  • Supports Classic Editor and Block Editor
  • Shortcode to show Events (listed per month)
    • All Upcoming Events - shortcode [events]
    • All Past Events - shortcode [events time="past"]
    • All Past Events, recent first - shortcode [events time="past" order="DESC"]
    • Upcoming Events of a specific category - shortcode [events category="Term Name"]
    • Upcoming Events of the same category - shortcode [events category="Same"]
    • Limit number of events - shortcode [events number=3]
    • Show menu Events - shortcode [events menu="show"]
    • Combine attributes and values to your liking
  • The Date format follows the date format set under General Settings
  • The Date is displayed in localized format
  • No Archive Pages for Event, Event Categories, and Venues (use the shortcodes)
  • Use menu Events to add pages w/ shortcode for Event Categories (for example)
  • Use custom Single Page for Event (make it your own)
  • Use custom [events] shortcode template (make it your own)
  • No frontend stylesheet loaded

Requirements

  • PHP >= 7.1
  • Wordpress >= 5.1

Installation

You can install this plugin via the command-line or the WordPress admin panel.

via Command-line

If you're using Composer to manage WordPress, add Event Manager to your project's dependencies.

composer require h-enk/event-manager

Then activate the plugin via wp-cli.

wp plugin activate event-manager

via WordPress Admin Panel

  1. Download the latest zip of this repo.
  2. In your WordPress admin panel, navigate to Plugins->Add New
  3. Click Upload Plugin
  4. Upload the zip file that you downloaded.

Usage

  • Add Events, Event Categories, and Venues
  • Insert shortcode [events] or [events category="Term Name"] in your page.

Styling

Define the available classes in your themes' stylesheet: event-month, event-title, event-meta, event-date, event-time, event-venue, and event-price.

Custom shortcode template

The [events] shortcode includes the template from templates/shortcode-events.php. If you'd like to use a custom template, copy shortcode-events.php into the templates/ directory in your theme and also implement the following example snippet:

/**
 * Custom [events] shortcode template
 */
function custom_events_template() {
  return get_template_directory() . '/templates/shortcode-events.php';
}
add_action('events_template', 'custom_events_template');

If you're using Sage, add the (renamed) template file to views/partials, and add this snippet to app/setup.php:

/**
 * Custom [events] shortcode template
 */
add_action('events_template', function () {
    return get_template_directory() . '/views/partials/events.blade.php';
});

Custom Single Page for Event

Copy your themes' single.php and rename it to single-event.php. Make it your own - see e.g. templates/twentynineteen/single-event.php and templates/twentynineteen/template-parts/content/content-event.php