• How can I use a field for different organizers?

    We manage events from different organizers. Unfortunately, there is not yet a separate field for this. Is it still possible to create an additional field for the organizer of each event?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Here’s some documentation on how you could create a separate field for the event organizer: https://wp-events-plugin.com/documentation/event-attributes/

    Thread Starter roundaboutweb

    (@roundaboutweb)

    Thanks, this was helpful. But how can I hide the display if the attribute has no content? I seem to be using the wrong syntax:

                {has_att}
                <div class="em-item-meta-line em-item-taxonomy em-event-att">
                    <span class="em-icon-category em-icon"></span>              
                    <div>Veranstalter: #_ATT{Veranstalter}</div>
                </div>
                {/has_att}

    Presumably “_att” and “em-event-att” is wrong, but what should be there instead?

    You can create your own conditional placeholder by adding the following code snippet:

    add_filter( 'em_event_output_show_condition', 'my_em_has_organizer', 1, 4 );
    // Whether to display the event format content between {has_organizer}the content{/has_organizer}
    function my_em_has_organizer( $show, $condition, $full_match, $EM_Event ) {
    if ( 'has_organizer' == $condition ) {
    $organizer = get_post_meta($EM_Event->post_id, 'Veranstalter', true);
    if ( !empty( $organizer ) )) {
    $show = true;
    }
    }
    return $show;
    }

    You can add this code snippet using the Code Snippets plugin.

    After that your formatting would look like this:

                {has_organizer}
    <div class="em-item-meta-line em-item-taxonomy em-event-att">
    <span class="em-icon-category em-icon"></span>
    <div>Veranstalter: #_ATT{Veranstalter}</div>
    </div>
    {/has_organizer}

    Actually you don’t need to add my code snippet. See the following documentation: https://wp-events-plugin.com/documentation/conditional-placeholders/#general

    You can use the following:

                {has_att_Veranstalter}
    <div class="em-item-meta-line em-item-taxonomy em-event-att">
    <span class="em-icon-category em-icon"></span>
    <div>Veranstalter: #_ATT{Veranstalter}</div>
    </div>
    {/has_att_Veranstalter}
    Thread Starter roundaboutweb

    (@roundaboutweb)

    Thank you very much, that was helpful.
    So the extension “_Veranstalter” was missing. Now it works.

    One more quick question:
    Where is there an overview of the available icons (e.g. “em-icon-category”, “em-icon-clock”, …)

    I didn’t find a list of the available icons in the documentation but there is a css file that gives an oversight, see: /wp-content/plugins/events-manager/includes/css/events-manager.css.
    If you download this file you can find a kind of list.

    Beware: Don’t overwrite the original file in this directory, that might break your installation.

    Here’s the list of icons I got from events-manager.css:

    em-icon-at
    em-icon-attendees
    em-icon-calendar
    em-icon-calendar-empty
    em-icon-category
    em-icon-checkmark
    em-icon-checkmark-circle
    em-icon-chevron-down
    em-icon-chevron-up
    em-icon-clock
    em-icon-close
    em-icon-collapse
    em-icon-compass
    em-icon-cross-circle
    em-icon-download
    em-icon-edit
    em-icon.em-icon-cross-circle
    em-icon.em-icon-trash
    em-icon.em-icon-updated
    em-icon-enter
    em-icon-exit
    em-icon-expand
    em-icon-filter
    em-icon-filter-hide
    em-icon-first-circle
    em-icon-folder
    em-icon-info
    em-icon-last-circle
    em-icon-list
    em-icon-list-grid
    em-icon-list-grouped
    em-icon-location
    em-icon-location-off
    em-icon-location-on
    em-icon-logo-apple
    em-icon-logo-google-calendar
    em-icon-logo-office365
    em-icon-logo-outlook
    em-icon-magnifying-glass
    em-icon-map
    em-icon-minus
    em-icon-multiple
    em-icon-next-circle
    em-icon-options-v
    em-icon-phone
    em-icon-plus
    em-icon-point-down
    em-icon-prev-circle
    em-icon-settings
    em-icon-sort-asc
    em-icon-sort-desc
    em-icon-spinner
    em-icon-tag
    em-icon-ticket
    em-icon-tickets
    em-icon-trash
    em-icon-undo
    em-icon-updated
    em-icon-warning
Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.