Title: Automatic duplication functionality?
Last modified: July 26, 2017

---

# Automatic duplication functionality?

 *  Resolved [davelee811](https://wordpress.org/support/users/davelee811/)
 * (@davelee811)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/)
 * MagicStick, you mentioned 8 mos ago in this post:
 * [https://wordpress.org/support/topic/update-and-automation-plugin/](https://wordpress.org/support/topic/update-and-automation-plugin/)
 * that you pushed an update that incorporated ‘automatic duplication functionality’..
 * Where is it in settings? How does it work?
 * I’m using Postie to fetch and create custom/draft posts from emails and hope 
   to automatically/programmatically duplicate in subsites.. or make available to.
 * Can this be done with this plugin?
 * Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9355205)
 * Hi Dave. On the post there is a ‘create duplication link’ checkbox when you do
   a Multisite duplication. This will then automatically keep the two posts in sync
   when updating the source post in the future.
 * Enjoy! 😉
 *  Thread Starter [davelee811](https://wordpress.org/support/users/davelee811/)
 * (@davelee811)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9355251)
 * Hey thanks for the quick reply. I see. So the auto is only after a post has been
   manually selected for duplication. Shoot, I was hoping there was a trigger to
   auto-dupe new posts after the Postie plugin created them.
 * I haven’t dug into the code yet but do you know if the above might be doable 
   with existing code, or with reasonable tweaks?
 * Thanks again!
 *  [Wayne Allen](https://wordpress.org/support/users/wayneallen-1/)
 * (@wayneallen-1)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9355317)
 * (I am the author of Postie) It is likely you’d need to create a postie addon 
   that does whatever logic is necessary to let Multisite Post Duplicator know it
   should do something. It kind of depends on how [@magicstick](https://wordpress.org/support/users/magicstick/)
   implemented it.
    See [http://postieplugin.com/extending/](http://postieplugin.com/extending/)
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9355352)
 * Ah! Hold on. I created my own add on for this functionality. Basically adds ‘
   auto mode’. Simply edit the code to add the sites to auto add too (line 8)
 * [https://github.com/magicstickuk/multisite-post-duplicator-auto-post/blob/master/auto.php](https://github.com/magicstickuk/multisite-post-duplicator-auto-post/blob/master/auto.php)
 * You could also just run the core MPD function within Postie like Wayne has indicated
 *     ```
       /**
        *
        * This is the main core function on Multisite Post Duplicator that processes the duplication of a post on a network from one
        * site to another
        * 
        * @param int $post_id_to_copy The ID of the source post to copy
        * @param int $new_blog_id The ID of the destination blog to copy to.
        * @param string $post_type The destination post type.
        * @param int $post_author The ID of the requested post author from the destination site.
        * @param string $prefix Optional prefix to be used on the destination post.
        * @param string $post_status The post status for the destination ID. Has to be one of the values returned from the mpd_get_post_statuses() function
        * 
        * @return array An array containing information about the newly created post
        * 
        * Example:
        * 
        *          id           => 20,
        *          edit_url     => 'http://[...]/site1/wp-admin/post.php?post=20&action=edit',
        *          site_name    => 'Another Site'
        * 
        */
   
       mpd_duplicate_over_multisite($post_id_to_copy, $new_blog_id, $post_type, $post_author, $prefix, $post_status)
       ```
   
 *  Thread Starter [davelee811](https://wordpress.org/support/users/davelee811/)
 * (@davelee811)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9355549)
 * Excellent! Thank you both!
 *  [rikkter](https://wordpress.org/support/users/rikkter/)
 * (@rikkter)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9879480)
 * Ello,
 * I have 3 multisites. I am looking to duplicate a custom post type from either
   site 1 or site 2, to site 3. Thus making site 3 have every post from either site.
 * I tried the code from your link, [https://github.com/magicstickuk/multisite-post-duplicator-auto-post/blob/master/auto.php](https://github.com/magicstickuk/multisite-post-duplicator-auto-post/blob/master/auto.php),
   but I get errors on saving a new post type:
 *     ```
       Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /wp-includes/wp-db.php on line 1102
   
       Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/wp-db.php:1102) in /wp-admin/post.php on line 198
   
       Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/wp-db.php:1102) in /wp-includes/pluggable.php on line 1216
       ```
   
 * Also, only the main site duplicates it (even with the error) but the other site
   does not.
 * Not sure what I’m doing wrong here!
    -  This reply was modified 8 years, 4 months ago by [rikkter](https://wordpress.org/support/users/rikkter/).
 *  [flikweert](https://wordpress.org/support/users/corneflikweert/)
 * (@corneflikweert)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9926911)
 * I have the same problem as you rikkter.
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9926922)
 * I’ll have a look into this guys. Th Lanka for the heads up!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Automatic duplication functionality?’ is closed to new replies.

 * ![](https://ps.w.org/multisite-post-duplicator/assets/icon-128x128.png?rev=1562920)
 * [Multisite Post Duplicator](https://wordpress.org/plugins/multisite-post-duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-post-duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-post-duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-post-duplicator/reviews/)

## Tags

 * [duplication](https://wordpress.org/support/topic-tag/duplication/)

 * 8 replies
 * 5 participants
 * Last reply from: [MagicStick](https://wordpress.org/support/users/magicstick/)
 * Last activity: [8 years, 3 months ago](https://wordpress.org/support/topic/automatic-duplication-functionality/#post-9926922)
 * Status: resolved