Yoast Duplicate Post (and other duplication plugins)

No matter if you’re using a multisite or non-multisite version of my crossposting plugin, in both cases meta fields are used to store information about a crossposted copy of the post on other sites.

And when you’re using any plugins to clone your posts or maybe some custom code, it may interrupt the connection between the original post and its copies on subsites.

Luckily it can be configured easy enough. All we need to do is to ask Yoast Duplicate Post to ignore some specific meta keys, these ones: _crosspost_to_data, _crosspost_to_{SITE ID} (for multisite version of the plugin) or _crsspst_to_data, _crsspst_to_{SITE_DOMAIN} (for non-multisite version of the plugin)

Here is how to configure it:

Yoast Duplicate Post plugin settings
Please go to Settings > Duplicate post and add _crosspost_to_* into “Do not copy these fields” (for non-multisite version of the plugin it should be _crsspst_to_*.

If you are using any other plugins to clone your posts, the idea is the same. In code you can use a condition:

// multisite
if( 0 === strpos( $meta_key, '_crosspost_to_' ) ) {
	// do nothing if the meta key starts with _crosspost_to_
}

// not multisite
if( 0 === strpos( $meta_key, '_crsspst_to_' ) ) {
	// do nothing if the meta key starts with _crsspst_to_
}

Below is the video if you need more information, or maybe you’re wondering how to fix already broken post copies:

Need more help?