>
Download This Plugin | |
Download Elegant Themes | |
Name | Simple Events |
Version | 0.2 |
Author | Steve Taylor |
Rating | 0 |
Last updated | 2013-11-08 09:44:00 |
Downloads |
1508
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Simple Events plugin added 2 bytes of resources to the Home page and 4 bytes of resources to the sample Post page.
Simple Events plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Simple Events plugin ads no tables to your Wordpress blog database.If the plugin detects that there is a custom post type registered with a particular name (either 'event' or '*_event'), it steps in and does a number of useful additional things:
slt_all_events
in your posts query to true
. Alternatively, use slt_past_events
(set to true
) to get only past events.slt_se_listing_time_offset
. It defaults to 0
(no change from the current time). To set the cut-off to 24 hours ahead of the current time, hook a function to this filter that returns that value in seconds, i.e. 60 * 60 * 24
.slt_reverse_events
to true
.disable_simple_events
in your posts query to true
.IMPORTANT: The automatic event filtering only kicks in with front-end queries done using WP_Query
. Use this rather than get_posts
.
In addition, this function is provided for convenience. If an event date exists for the post in question, it returns that; if not, it returns the standard post date.
<?php slt_se_get_date( $the_post = null ) ?>
NOTE: An Event Date custom field will be added to the event edit screen automatically if my Custom Fields plugin is active. Otherwise, make sure your event post type supports custom-fields
(see [register_post_type](http://codex.wordpress.org/Function_Reference/register_post_type)
, and add dates to events with the format YYYY/MM/DD, e.g. 2011/12/21 - this format is required to allow sorting by this field.
NOTE: The filtering performed by this plugin currently doesn't work well with get_posts
- for now, create custom loops with WP_Query
.
Development code hosted at GitHub.