• Resolved bpsixstrng

    (@bpsixstrng)


    I am trying to show a map of the event page that is occurring today without having the user click on the link to the event first. Does this make sense? So basically, all I want is to show the map of today’s event. This way my client can input their venue and make an event and it will show the users a simple map of their current location. Any suggestions? I tried working with the ‘ondate’ etc but it only shows the listing, not the actual page/map.

    https://www.ads-software.com/extend/plugins/event-organiser/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi bpsixstrng,

    The ondate page is just the event archive page but restricted to events on the specified day. So you could edit archive.php (see this first) and include the event map using the function eo_get_venue_map() (outside the loop you need to specify the Venue ID – inside, you don’t need to pass anyting).

    It takes a second argument, an array which takes the same values as the venue map shortcode (zoom, width, height etc). (See source)

    Alternatively you can create a custom page and either create a custom template file to show ‘todays’ events, and use the above function to display the map.

    Or you can create a custom page and use the [eo_events] shortcode and use the event_start_before, event_start_after, event_end_before, and event_end_after arguments to restrict to the desired events (they take relative dates like ‘today’, ‘yesterday’ as well as 2012-09-25). The shortcode can used with a ‘template’ to set the output (and so include a map say). See documentation here.

    Hope that helps!

    Thread Starter bpsixstrng

    (@bpsixstrng)

    Thanks for the quick response! I may be reading it incorrectly, but the problem is that any of these processes still require the user to click that event before seeing the map. So if they go to pagename.com/events/event it will then show the event for the day, but you have to click that before seeing the map. I’m trying to make it so that if they go to pagename.com/events/event it will actually display the page for the current event with the map which would change each day depending on the events that are entered. Does this make sense?

    Depending on your permalink structure that will use the event-archive.php template – just edit that to display the map using the above function. If you want it to only display ‘todays’ events you make a new WP_Query (for post type ‘event’) or you can alter the query by intercepting it at pre_get_posts.

    I think the best option is just to create a ‘todays event’ page as mentioned above – you can get that display today’s event, along with its content, map, etc.

    Thread Starter bpsixstrng

    (@bpsixstrng)

    I’m sorry, I’m not quite up to that level, is there any additional help you can offer as far as code to get this moving? Any help is greatly appreciated. Thanks

    A very basic solution would be to create page with the following shortcode in the content:

    [eo_events event_start_after='today' event_start_before='today'] %event_venue_map%[/eo_events]

    which displays a map for and event starting today. You can also include other tags in the template, %event_title% etc. (see documentation).

    For something a bit more flexible you can create a custom page template – but that requires a bit of coding ability.

    Thread Starter bpsixstrng

    (@bpsixstrng)

    Thank you, that works perfectly

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Event Organiser] Show MAP of events PAGE of current event only’ is closed to new replies.