Events Made Easy Forums How do I … create my own placeholder

Tagged: 

  • This topic has 2 replies, 2 voices, and was last updated 6 years ago by Anonymous.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #57925
    Anonymous
    Inactive

    Is there a way to add a custom placeholder like #_MYOWNPLACEHOLDER? I could not find the answer in forum. Thanks a lot!

    #57926
    Franky
    Keymaster

    While creating shortcodes is fairly easy if you know wordpress, creating placeholders is in fact just a search/replace in existing text. I don’t know what you want to achieve, but look at the available filters/hooks for this.

    #57929
    Anonymous
    Inactive

    I want the result of #_BOOKINGS sorted by the field #_RESPNAME. I guess easiest would be to create my own placeholder for that.

    Using one of the filters, it’s easy to create own placeholders. The following example was for testing, it simply replaces the placeholder #_MYPLACEHOLDER with the text HERE IS MY OWN PLACEHOLDER:

    add_filter( 'eme_events_format_prefilter', 'zzp_eme_events_format_prefilter', 10, 2 );
    function zzp_eme_events_format_prefilter ( $format, $event ) {
    	$format = str_replace( '#_MYPLACEHOLDER', '<div>HERE IS MY OWN PLACEHOLDER</div>', $format );
    	return $format;
    }

    Thanks for your hint, Franky!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top