• Resolved zartgesotten

    (@wearitwell)


    Hi there,
    I have some questions:
    1. I would like to have selected sites post to a DEFAULT target site so the users won’t have to select a target, all events should be copied to that target site automatically.
    2. Coyping works fine but when I try to look at the copied event, it throws this error :
    Error in formating DateTime object. Expected DateTime, but instead given boolean
    I FOUND this solution from the developer of the event plugin:
    Support Topic event organiser but I don’t know how to trigger that code mentioned there. Can you help?

    Thank you very much!!!
    Regards
    Anja
    PS: I will happily buy you one or more beers if you help me with this ??

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

    (@magicstick)

    Hey Anja. You can use and edit the following plugin to autopost to a single site (just edit line 8 to be the id of the site you want to auto copy to…

    https://github.com/magicstickuk/multisite-post-duplicator-auto-post/blob/master/auto.php

    (just copy the code and stick it in your functions.php)

    Note that this plugin creates a link that will also auto update the destination posts if the source post is ever updated. If you just want this functionality to be on the events post type then select the events post type only in the first setting on the MPD settings page ??

    Good luck ! ??

    Plugin Author MagicStick

    (@magicstick)

    Regarding your problem on the other forum. this should solve. Simply place at the end of functions.php:

    function mpd_update_event_meta($post_id){
         eo_update_event($post_id);
    }
    
    add_action('mpd_end_of_core_before_return', 'mpd_update_event_meta');
    add_action('mpd_persist_end_of_core_before_return', 'mpd_update_event_meta');
    Thread Starter zartgesotten

    (@wearitwell)

    Thank you so much @magicstick!!!!
    That seems to do the trick!
    And sorry for cross-posting!!!
    Before I buy you a beer or two…
    Do you maybe also have a solution for selecting a custom target site?
    I have a project site with seven locations and I want to display all events from locations on the main project site.
    So the BEST solution for this would be an auto-duplicate to the main site if an event is added on any of the location sites. With no possibility for the user to select anything or modify. Just auto-duplicate to the mother site!
    THANKS again!
    Regards
    Anja

    Plugin Author MagicStick

    (@magicstick)

    zartgesotten glad to be of help! did my first reply on this thread not help on the events duplication? pretty sure that would do what you need! did you miss it?

    Thread Starter zartgesotten

    (@wearitwell)

    Oh …. sorry … I really missed that! Was so excited about the second part that I overread that. ?? That also seems to work like a charm. I will mark as resolved and buy you a beer now. ! YAY!

    Plugin Author MagicStick

    (@magicstick)

    Thank you so much. Glad to be of help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Error copying date from event post type’ is closed to new replies.