• Juan

    (@cybnet)


    I’ve been trying to get the ID of newly duplicated post. The recommended method to duplicate a post is:

    DuplicatePost::_duplicate_post( $original_post );

    But that method returns nothing.

    I’ve found this way to do the same and get the duplicated post ID:


    $DuplicatePost = DuplicatePost::getInstance();
    $duplicated_post_id = $DuplicatePost->duplicate_post_create_duplicate( $post );

    Any better way?

    https://www.ads-software.com/plugins/duplicate-and-merge-posts/

  • The topic ‘Get duplicated post ID’ is closed to new replies.