Support » Plugin: Events Manager » function not working after upgrade to

  • simonc17



    I have a custom function that for a recurring event generates a list of the IDs of each event in that series. I then use this to write out the date and time of the recurring events as a list when viewing a single event in the series.
    The function is:

    function recurrence_placeholders($replace, $EM_Event, $result) {
    global $wp_query, $wp_rewrite;
    switch( $result ){
    case ‘#_RECURRENCEID’:
    $replace = $EM_Event->recurrence_id;
    return $replace;

    In the event list I then use #_RECURRENCEID as follows:

    <h3>Future services:</h3>
    [events_list recurrence=”#_RECURRENCEID”][/events_list]

    This has been working well for two years. Since upgrading today however to the latest EM version, the list of recurring events now shows the date and time of every event in the future whether it is an event in this series or not.

    Has a change under the covers in this version now invalidated the function?

    Many thanks,


Viewing 10 replies - 1 through 10 (of 10 total)
  • thinkero


    It seems that conditional tags like {is_future}{/is_future} are not working.
    I have a similar problem transmitting a value #_LOCATIONPOSTID via shortcode.

    • This reply was modified 1 month ago by  thinkero.
    Plugin Support angelo_nwl


    just to confirm, your custom placeholder and custom conditional placeholder are both not working or only the placeholder?



    Hi Angelo,

    The conditional placeholders (e.g. has_tag_services) are working OK. So, if I have an event not tagged as ‘services’ and that is not a recurring event then I get no list of future related events which is correct.

    The problem is only appearing with recurring events. Either the custom function (and hence custom placeholder) is no longer working or the event list shortcode search attribute ‘recurrence’ is not working. The custom placeholder should have the ID of the recurring event which is then used in the search attribute to return all events in that recurring series.

    Do you know how I can print out the value of #_recurrenceid so I can check it is being set correctly?





    Hi Angelo,

    Managed to print out the value of #_RECURRENCEID. It is correctly set to the ID of the recurring event. So the custom function and custom placeholder are OK.

    I then put this value into the event list shortcode as [events_list recurrence=”1632″][/events_list] and the correct list of related events is generated.

    So what is now wrong with [events_list recurrence=”#_RECURRENCEID”][/events_list] as this was working until the upgrade to I am assuming it no longer likes the placeholder name as the value for recurrence, in which case what can I do?



    Plugin Support caimin_nwl


    Hi Simon,

    Where exactly are you using that shortcode?




    I’m using it in Events > Settings > Formatting > Events > Single event page format.

    The conditional placeholders test if the event selected from the calendar is tagged as a service and if it is, whether it is a recurring event. If it is a recurring event then the shortcode gets all the events generated from the recurring template. Which recurring template it is is worked out by the custom function and held by the custom placeholder.

    I know that the placeholder has the right recurring template ID as I printed the value out immediately after the list generated by the shortcode. Putting that value into the shortcode rather than the placeholder name gets all the correct recurring events. So it is as if you can no longer use a placeholder name as the value for a search attribute.

    This all worked beautifully until I upgraded from to

    Thanks for the help.



    I think I have the same issue. See my bug-ticket here:

    I identified that from EM onwards it is no longer possible to use a shortcode in the settings page! Up and until EM everything works fine.
    Event the shortcode with standard-placeholders do not work correctly anymore, e.g. [events_list near=”#_LOCATIONLATITUDE,#_LOCATIONLONGITUDE” near_unit=”km” near_distance=”100″ limit=”10″ pagination=”1″] gives as a result ALL events and not only the nearby events.
    So the error is probably related to the updates in EM!

    Plugin Support caimin_nwl


    Just to let you know, the issue with placeholders not parsing within shortcodes on the single event page has been reported to the developer team for a fix.

    Plugin Author Marcus


    NetWebLogic Support

    unfortunately this bug arose by us trying to fix another bug where users were trying to create shortcodes with formats within it e.g.


    Previously you’d end up with a list containing the name of the same event since #_EVENTNAME was parsed before the shortcode. ‘fixed’ this by parsing shortcodes first, but inadvertedly created this bug you’re reporting since any arguments are not parsed yet.

    We’re going to revert this in the next update. However, since we’re in a bit of a limbo with timezone integration it may be a few more weeks between the next update, so the short-term solution would be to manually edit and comment out or remove this line on /events-manager/classes/em-events.php (line 1710):

    $format = do_shortcode($format); //parse shortcode first, so that formats within shortcodes are parsed properly

    Sorry for the inconvenience! We’ll also be putting this out on the next dev update too, so if you’re up for experimenting with our new timezone features, we’d love to get more people trying it out.

    Hi Marcus,
    Many thanks for looking into this, these things happen. The issue wasn’t causing a serious problem so I simply commented out the code that creates the recurring list in the Events List formatting section as a temporary fix.
    Keep up the great work. I looked at many event managers/calendars before deciding upon yours and haven’t ever regretted the decision.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.