• Resolved Anonymous User 14123315

    (@anonymized-14123315)


    As the title says, is it possible to take a duplicate page and insert the meta data into wp_insert_post()?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @blingblingbling,

    We’re sorry for the delay getting back to you. Duplicate post provides the duplicate_post_create_duplicate function, which creates a duplicate of any post object. You can find more information about how to use it in the Yoast Duplicate Post developer documentation.

    If there is post meta data that you’d like to add that hasn’t been copied to the new post, you may have to manually copy the fields. You can check out the other Duplicate Post functions in the documentation or use WordPress functions like get_post_meta and add_post_meta, for example.

    Let us know if you have any other questions.

    Hi @blingblingbling,

    We’re marking this issue as resolved due to inactivity. You’re welcome to create a new issue if you need further assistance.

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

The topic ‘Is it possible to insert duplicate post into wp_insert_post function?’ is closed to new replies.