• Resolved jonmojo

    (@jonmojo)


    Is there an Events Manager attribute that will allow me to only show the main event? e.g. [events_list ongoing_events=”main_only”].

    Also is there the equivalent of ‘Events -> Settings -> Formatting’ for the output or can the pages/formatting in Events Manager be extended to add it?

    I’m trying to get a full listing of events, showing each event with its ongoing events using the formatting for the Events page. No header or footer, just repeating events.

    <div id='event_item' class='pm_zoom_event'>
    <div id='event_img'>#_EVENTIMAGE{300,0}</div>
    <div id='event_info'>
                    <h2 class='event_title pm_evt_heading'><a href='#_ATT{Event URL}' target='_blank'>#_EVENTNAME</a></h2>
                   <p class='event_dates pm_evt_heading'>#_EVENTDATES, @#_EVENTTIMES</p>
                    <h3 class='event_sub'>#_ATT{Sub heading}</h3>
                   <span class='event_desc'>#_EVENTNOTES</span>
                   <p class='event_location'> {has_location}#_LOCATIONNAME, #_LOCATIONTOWN, #_LOCATIONSTATE{/has_location}</p>
                   <p>#_ONGOINGEVENTS</p>
    </div>
    </div>
    <hr class="wp-block-separator">

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Stonehenge Creations

    (@duisterdenhaag)

    Hi @jonmojo,
    No, there is no built-in shortcode argument for Ongoing Events specifically. For the add-on I enabled the custom post type hierarchy, so WordPress can easily link them to the main event with post_parent.

    Luckily Events Manager treats sub events exactly the same as single events. So the simplest solution to not show the sub events in the events list is to create a new Events Category and assign your sub events to that.
    The regular shortcode allows you to filter the output by category ID. [events_list catergory=“-29”]

    Please check the official Events Manager documentation for a full explanation:
    https://wp-events-plugin.com/documentation/event-search-attributes/

    It is important to realize that Events Manager only applies search filters in shortcodes. The default Events Page (if assigned in the EM settings) will always show all events. You can recognize that page in the Admin side by the Admin Notice starting with “This page corresponds to the Events Manager Events page.”

    I’m trying to get a full listing of events, showing each event with its ongoing events using the formatting for the Events page.

    I am not quite sure what you mean exactly, but I think one page long page for a complete Ongoing Events series.

    Events Manager treats every event as single event with its own event page (comparable to recurring events). If you want to have all content on one page, you will need to edit the single-event.php template with custom coding bu adding a check if the current EM Event Object is part of an Ongoing Series, and if so, make it loop though the child (sub) posts.
    That is also the main reason why this plugin automatically adds the [ongoing_events] shortcode to the sub events content.

    Hope it helps.
    Please let me know ??

    Plugin Author Stonehenge Creations

    (@duisterdenhaag)

    Oh, I had forgotten about the [event post_id='23'] shortcode…
    That shortcode will output the event page content as defined in the EM settings “Single Event Page” (disregarding the theme’s header, footer, sidebar, etc).

    So in the main event content, you could add in ascending order:

    <hr>
    [event post_id='31']
    <hr>
    [event post_id='32']
    <hr>
    [event post_id='33']

    Of course, this would be a manual process, as the post ID’s are always different. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Select only the main event’ is closed to new replies.