How to customize shortcodes?
Share

The [events_list] shortcode is a very common name, used by many event plugin.

If you plan to migrate from another event plugin to Event-Post and really can’t convert your old events, you may need to keep and archive of your old events, but shortcodes will be in conflict.

Lucky you, since its version 5.3.3, Event-Post allows to change its shortcodes name with the eventpost_shortcode_slug filter.

How does it work?

In four functions.php, just call the filter like this

<?php
add_filter('eventpost_shortcode_slug', 'my_theme_eventpost_shortcode_slug');

function my_theme_eventpost_shortcode_slug($slug){
    return 'ep_'.$slug;
}
?>

From now, you’ll need to call the shortcodes like this: [ep_events_list] or [ep_events_map].

Leave a Reply

Your email address will not be published. Required fields are marked *