• I’ve been trying to create a custom shortcode using Event Organizer’s eo_get_events function but limited my knowledge of PHP has left me high and dry. I can’t seem to pass an array to the function correctly.

    This is about as far as I can get on my own:

    // [custom:all_music]
    function mailpoet_shortcodes_custom_filter( $tag_value , $user_id) {
    
    if ($tag_value === 'all_music') {
        $replacement = eo_get_events(array(
              'event_start_after'=>'yesterday',
              'event_start_before'=>'+2 weeks'
                                     ));
                                     }
    
    return $replacement;
    }
    
    add_filter('wysija_shortcodes', 'mailpoet_shortcodes_custom_filter',10 ,2);

    https://www.ads-software.com/plugins/wysija-newsletters/

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

    Have you followed this guide on custom shortcodes with MailPoet? https://support.mailpoet.com/knowledgebase/hook-to-add-your-own-shortcode/

    You need to know how to work with PHP and how Event Organizer handles the data. Unfortunately we can’t provide support for customizations.

    Thread Starter eresame

    (@eresame)

    Thank you. I have read that and my code complies with it and PHP standards, though either WordPress or your plugin doesn’t interpret arrays the way that I’ve written my shortcode. I appreciate that you cannot provide support for customizations. Have you considered integrating support for non-MailPoet shortcodes into your plugin?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Shortcode for Event Organizer’ is closed to new replies.