Shortcodes

POM Events registers two shortcodes, both also available as page-builder elements.

[web_event_search_form]

A filterable event list with AJAX results.

Attribute Values Effect
hide_calendar yes Hides the filter column, including the date picker
error_msg Text The message for a calendar month with no events
el_class Class name An extra class on the container

It renders a date picker, a Filter by type checkbox group, a Filter by category checkbox group, and a results area with a Load more events control.

[pom_events_fullcalendar]

A month calendar of every published event.

Attribute Effect
el_class An extra class on the calendar container

Each entry carries the event title, its start and end, a link to the event, and its event category slugs as classes — the supported way to color-code a calendar by category.

Extending the search form

The search configuration is exposed through a filter, which is the supported way to change the query, the fields or the AJAX behavior:

add_filter( 'web_event_search_form', function ( $args ) {
    // Limit the list to one category.
    $args['wp_query']['tax_query'] = array(
        array(
            'taxonomy' => 'event_category',
            'field'    => 'slug',
            'terms'    => array( 'concerts' ),
        ),
    );

    return $args;
} );

The array carries:

Key Contents
wp_query The base query: post type, status, page size, ordering, and the upcoming-events meta query
form Form behavior, including the AJAX configuration
fields The rendered fields, including the taxonomy filters

Adding a filter field

add_filter( 'web_event_search_form', function ( $args ) {
    $args['fields'][] = array(
        'label'       => __( 'Filter by tag', 'my-plugin' ),
        'type'        => 'taxonomy',
        'format'      => 'checkbox',
        'term_format' => 'slug',
        'taxonomy'    => 'post_tag',
    );

    return $args;
} );

Taxonomy fields are rendered as checkbox or radio groups with an All option, and the submitted values are applied to the query as a taxonomy clause. Hierarchical taxonomies include their children.

Including past events

The base query filters to events whose end date is today or later. To include past events in a specific listing, remove that clause:

add_filter( 'web_event_search_form', function ( $args ) {
    unset( $args['wp_query']['meta_query'] );
    $args['wp_query']['order'] = 'DESC';

    return $args;
} );

Note that the filter is global, so scope such a change to the page or context where you want it.

Requirements

Both shortcodes only exist when the POM theme is active. On another theme they are not registered and produce nothing.

Guard any code that assumes them:

if ( shortcode_exists( 'web_event_search_form' ) ) {
    // Safe.
}

What the shortcodes do not accept

No attributes for ordering, page size, restricting to a taxonomy term, including past events, or the result item's markup. Those are the filter's territory, or the template's.

The results template

The list items are rendered by the plugin's results template. To change the markup of a result, override or extend it through the theme rather than by filtering the output string — see Template integration.