Plugin Author
Franky
(@liedekef)
You can use the shortcode eme_event with as I’d the placeholder #_SINGLE_EVENTPAGE_EVENTID
And in that shortcode use a template to just show the map.
Thread Starter
mlplus
(@mlplus)
I get “No such event” from this
Plugin Author
Franky
(@liedekef)
Thread Starter
mlplus
(@mlplus)
Is there a possibility to do the same thing with a single location?
Plugin Author
Franky
(@liedekef)
And what would the purpose be there?
Thread Starter
mlplus
(@mlplus)
Same purpose, to put the map in the widget under “KARTA”. See here: https://skaneplus.se/locations/288/malmo-folkets-park/
Plugin Author
Franky
(@liedekef)
While you can already achieve that with the eme_event shortcode and the aforementioned placeholder, this is done (untested, but should work):
https://plugins.trac.ww.wp.xz.cn/changeset/2713502
Thread Starter
mlplus
(@mlplus)
Ok, I tried but I couldnt get it to work.
Plugin Author
Franky
(@liedekef)
And what exactly did you try?
Thread Starter
mlplus
(@mlplus)
I made your changeset and put [eme_location_map id=#_SINGLE_EVENTPAGE_LOCATIONID] in the widget.
But reading yur code in the changeset you are taking the event id, but showing a single location doesnt have an event id???
Plugin Author
Franky
(@liedekef)
No, it just replaces the value with the location id of the currently shown event.
But there was a typo in it, this fixes it:
https://plugins.trac.ww.wp.xz.cn/changeset/2713630/
Thread Starter
mlplus
(@mlplus)
Well that will not work showing a single location
Plugin Author
Franky
(@liedekef)
Can you explain more? Because your remarks are very short. Showing a location that is not linked to an event can be done with a location number. Widgets are not linked to the event shown, in WordPress they are standalone parts, so to show info from the event shown in a widget you can use the placeholders I mentioned.
If something is not working, please be more descriptive.
Thread Starter
mlplus
(@mlplus)
I hope this widget code will explain what I want to do:
/* Code in widget that is visible on single event/location page */
/* If showing a single event show the events location map in widget */
[eme_if tag=’#_IS_SINGLE_EVENT’ value=’1′]
[eme_event id=#_SINGLE_EVENTPAGE_EVENTID template_id=10 template_id_header=4 template_id_footer=5]
[/eme_if]
/* If showing s single location show the locations map in the widget */
[eme_if tag=’#_IS_SINGLE_LOC’ value=’1′]
[eme_location_map id=#_SINGLE_EVENTPAGE_LOCATIONID]
[/eme_if]`