• Resolved krkjee

    (@krkjee)


    Hi,
    Your plugin i working perfectly with posts on my multisite, but is it possible to add the same effect on posts from the plugin Event Organiser?

    I have contacted the author of the Event Organiser plugin, and they tell me that this code needs to be added in your plugin, but where?
    eo_update_event( $duplicated_event_id );

    Can you help me?

    Thank you in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author MagicStick

    (@magicstick)

    Hi krkjee. Add the following code anywhere in your themes function.php and you should be good to go!

    function mpd_prepare_destination_event_organiser($post_id, $source_post){
    
        if($source_post['post_type'] == 'event'){
            if (function_exists('eo_update_event')) {
                eo_update_event( $post_id );
            }
        }
    
        return;
    
    }
    add_action('mpd_end_of_core_before_return','mpd_prepare_destination_event_organiser', 10, 2);

    Let me know how you get on!

    • This reply was modified 8 years, 2 months ago by MagicStick.
    Thread Starter krkjee

    (@krkjee)

    Awesome, it works perfectly!
    Thank you so much ??

    Plugin Author MagicStick

    (@magicstick)

    Glad to help! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add Event Organiser posts’ is closed to new replies.