Skip to content

Auke1810/wp-pronamic-events

 
 

Repository files navigation

Pronamic Events is a basic plugin to add some Events functionality.

WordPress Query

$query = new WP_Query( array(
	'post_type'                 => 'pronamic_event',
	'pronamic_event_date_after' => strtotime( 'today' ), // default
	'orderby'                   => 'pronamic_event_start_date', // default
) );
$query = new WP_Query( array(
	'post_type'                 => 'pronamic_event',
	'pronamic_event_date_after' => strtotime( '-1 month' ),
	'orderby'                   => 'date',
) );
$query = new WP_Query( array(
	'post_type'                 => 'pronamic_event',
	'pronamic_event_date_after' => false,
	'orderby'                   => 'pronamic_event_start_date',
) );

Parameters

pronamic_event_date_after

Type: int
Default: strtotime( 'today' )

orderby

Type: string
Default: pronamic_event_start_date

WordPress Filters

pronamic_events_date_offset

function prefix_pronamic_events_date_offset( $offset = 'today' ) {
	$offset = '-2 days';
	
	return $offset;
}

add_filter( 'pronamic_events_date_offset', 'prefix_pronamic_events_date_offset' );

Post Class

The Pronamic Events will automatic add the event-ended post class if an event is ended.

Resources

About

Pronamic Events is a basic plugin to add some Events functionality.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 94.9%
  • JavaScript 3.8%
  • CSS 1.3%