• The “All Events” listing at /wp-admin/edit.php?post_type=event has the following columns:

    Event
    Organiser
    Categories
    Venue
    Start Date/Time
    End Date/Time
    Recurrence

    I enabled “Event Tags” in the General setting “Select which features events should support”. I think if this is enabled, there should be a “Tags” column after “Categories”, and a tag filter dropdown (“View all tags”, etc.)

    We use a lot of Event Tags and it’s hard to proof that we have the correct tags on upcoming events without this functionality.

    • This topic was modified 3 months, 2 weeks ago by pzingg.
Viewing 1 replies (of 1 total)
  • Thread Starter pzingg

    (@pzingg)

    I guess this is pretty easy for devs to do.

    To show column in admin CPT table:

    function myplugin_register_event_tag( $event_tag_args ) {
    $event_tag_args['show_admin_column'] = true;
    return $event_tag_args;
    }
    add_filter( 'eventorganiser_register_taxonomy_event-tag', 'myplugin_register_event_tag' );

    To add filter dropdown:

    function myplugin_restrict_events_by_tag() {
    global $typenow;

    $category_tax = get_taxonomy( 'event-tag' );

    if ( 'event' === $typenow &&
    $category_tax && wp_count_terms( 'event-tag' ) > 0 ) {
    eo_taxonomy_dropdown(
    array(
    'taxonomy' => 'event-tag',
    'selected' => get_query_var( 'event-tag' ),
    'hide_empty' => false,
    'show_option_all' => $category_tax->labels->view_all_items,
    )
    );
    }
    }
    add_action( 'restrict_manage_posts', 'myplugin_restrict_events_by_tag' );
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.