Support » Plugin: Multisite Post Duplicator » How not to duplicate content?

  • lautiamkok

    (@lautiamkok)


    I wish you have an option to exclude the post content from being duplicated. We just want to duplicate everything (meta, image, etc) of a post, except its content.

Viewing 1 replies (of 1 total)
  • lautiamkok

    (@lautiamkok)

    Found the answer thanks.

    /**
     * Don't persist title & content on Multisite Post Duplicator.
     * https://wordpress.org/support/topic/how-to-copy-the-linked-post-without-overwriting-the-title/
     */
    function dont_persist_title($persistpost){
        unset($persistpost['post_title']);
        return $persistpost;
    }
    add_filter('mpd_setup_persist_destination_data','dont_persist_title',10,1);
    
    function dont_persist_content($persistpost){
        unset($persistpost['post_content']);
        return $persistpost;
    }
    add_filter('mpd_setup_persist_destination_data','dont_persist_content',10,1);
Viewing 1 replies (of 1 total)
  • The topic ‘How not to duplicate content?’ is closed to new replies.