An open API service indexing awesome lists of open source software.

https://github.com/mdb/eventpublisher

A basic event publisher plugin for Wordpress.
https://github.com/mdb/eventpublisher

Last synced: 7 months ago
JSON representation

A basic event publisher plugin for Wordpress.

Awesome Lists containing this project

README

          

# EventPublisher #

EventPublisher is simple Wordpress plugin that enables the publication of events via the Wordpress admin. It utilizes the jQuery UI datepicker and leverages Wordpress's custom post type features to create an Event post type in addition to Wordpress's built-in Posts and Pages.

## Features ##

EventPublisher offers the following:

- Creates an "Event" custom post type alongside Wordpress's "Posts" and "Pages."
- Fields to house event title, event description, event location, event start date/time, and event end date/time. Users can assign a "Featured" event, in effect flagging the event for more prominent promotion on the front end.
- Basic template tags for calling and displaying Events in your Wordpress theme templates.

## Installation ##

- Put the EventPublisher folder in your Wordpress site's wp-content/plugins/ directory.
- Visit your site's Plugins manager page within the Wordpress admin (wp-admin/plugins.php)
- Locate "Event Publisher" amongst the list of available plugins and click "Activate."

## How to publish an event ##

- Log in to your Wordpress site's admin (http://yoursite.com/wp-admin).
- Locate and click "Events" in the menu within the left column.
- Click "Add new."
- Enter a title, description, event location, event start date/time, and event end date/time.
- If you'd like to flag your event as "Featured," tick the Featured Event checkbox in the right column.
- Click "Publish," just as you would with an normal Wordpress blog post.

## How to display your events in your Wordpress theme templates ##

### Upcoming Events

A basic example of how to call the list of upcoming events:



    posts as $post ) : setup_postdata($post); ?>
    ID, 'event_location', true);
    $start_date = get_post_meta($post->ID, 'start_date', true);
    $end_date = get_post_meta($post->ID, 'end_date', true);
    ?>



  • Start Date:


    End Date:







Note that the maximum number of posts returned by ep_upcoming_events() is determined by your site's Reading settings (http://yoursite.com/wp-admin/options-reading.php)

Alternatively, to customize the number of events to display, use ep_get_events(). The following example returns the next 3 upcoming events:




    ID, 'event_location', true);
    $start_date = get_post_meta($post->ID, 'start_date', true);
    $end_date = get_post_meta($post->ID, 'end_date', true);
    ?>



  • Start Date:


    End Date:







### Past Events

Alternatively, use ep_get_events() to customize the number of past events to display. The following example returns the first 3 past events:

### Featured Events

Calling the Featured events defaults to displaying the next upcoming Featured event: