Events Manager
[resolved] Call current Location/event ID in shortcode. (4 posts)

  1. adzay
    Posted 3 years ago #

    Hi, I want to call all the next events for my locations by editing my actual page template file.

    Unfortunately I have already edited the #LOCATIONALLEVENTS placeholders to show thumbnails instead of a simple list. Because that placeholder is used to show an image and I also want a worded list version. I tried to use the short-code 'Events_list' and place it in my php page.

    My issue is that it Calls ALL events, and since i am putting it on a Locations page template I cannot set the location Id (one of your search Attributes) within the short-code because it will always change depending on the location being viewed.

    Hereswat I tried..

    [events_list limit="10" location="id"]

    I assumed that the above short-code would work but it didn't :(.

    I have looked through the documentation but the examples do not help me to understand clearly.


  2. agelonwl
    Posted 3 years ago #

    you can modify placeholder - http://pastebin.com/MhkCLJkE (paste in your theme functions.php)

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    if you're doing this on a location page, then you should be able to get the location id by using global $EM_Location


  4. adzay
    Posted 3 years ago #

    Thanks agelonwl, The code worked. I just had to change 'dbem_location_event_list_item_footer_format' into 'dbem__event_list_item_footer_format' so that it could use the #EVENTS placeholder format (which I haven't changed).

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic