Support » Plugin: Events Manager » Events Manager v5.3 Placeholders Problem

  • Resolved Stewart Barklem


    Upgraded to 5.3 and placeholders e.g #_LOCATIONNAME stopped working in the body of the event. So in the Single Event Settings I have …

    .. and these display, but if I put these in the body of the event they now don’t display and I get #_LOCATIONNAME instead.

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

    I get this too however this might not be a bug since it’s working in events > formatting and/or emails but I’ve let Marcus know about it.

    Plugin Author Marcus


    This is due to a recent change/fix to how placeholders are used in the description of an event. since you can use shortcodes combined with placeholders, placeholders on there aren’t converted anymore since 5.3, only if within shortcode.

    Here’s a snippet to enable placeholders on your descriptions if needed (note that using ph’s in shorcode may not work properly with this)

     * Parses the event description to convert placeholders
     * @param string $result
     * @param EM_Event $EM_Event
     * @param string $placeholder
     * @param string $target
     * @return string
    function my_em_event_output_placeholder($result,$EM_Event,$placeholder,$target='html'){
    	if( in_array($placeholder, array('#_EVENTNOTES','#_NOTES','#_DESCRIPTION','#_LOCATIONNOTES','#_CATEGORYNOTES')) ){
    		$result = $EM_Event->output($result);
    	return $result;
    Plugin Author Marcus


    paste this into your themes functions.php file

    Thanks for this, very helpful I now understand this. It’s good that my own shortcodes work in events.
    As I don’t need to do this very often I have decided to get round this by just putting the placeholders in a shortcode. So I have used ..
    [locations_list]ID=#_LOCATIONID Name=#_LOCATIONLINK[/locations_list]
    .. to find out the locationID and then used something like …
    [location location=4]#_LOCATIONMAP[/location]

    Plugin Author Marcus


    better yet, I’m going to add in the upcoming update an option to just use

    [location] or [event] within a location/event description and it’ll default to the current location/event if you don’t supply an ID number.


    Still a slight niggle with this. In the list view the placeholders are interpreted correctly but the [event]… [/event] tags are still there!

    Plugin Author Marcus


    will look into that. in the meantime you could try adding this line:

    add_filter('dbem_notes', 'do_shortcode');

    not ideal but may do what you need for now.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Events Manager v5.3 Placeholders Problem’ is closed to new replies.