Title: Duplicate Post via theme function or php
Last modified: October 1, 2017

---

# Duplicate Post via theme function or php

 *  Resolved [cr10upgrades](https://wordpress.org/support/users/cr10upgrades/)
 * (@cr10upgrades)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/duplicate-post-via-theme-function-or-php/)
 * I have seen the documentation, and had a quick search in the support forum to
   help answer my question.
 * Is there a way to make a function call in code to clone/duplicate a post?
 * something like:
 * duplicate_a_post_by_id($theid);

Viewing 1 replies (of 1 total)

 *  Plugin Author [Enrico Battocchi](https://wordpress.org/support/users/lopo/)
 * (@lopo)
 * [8 years, 8 months ago](https://wordpress.org/support/topic/duplicate-post-via-theme-function-or-php/#post-9567184)
 * Hi [@cr10upgrades](https://wordpress.org/support/users/cr10upgrades/),
    sorry
   for the delay!
 * I wrote the documentation for the main function used by my plugin, [you can see it here](https://duplicate-post.lopo.it/docs/developers-guide/functions-template-tags/duplicate_post_create_duplicate/).
   
   Hope this is what you are looking for!
 * Feel free to write if you have any issue, proposal or doubt!

Viewing 1 replies (of 1 total)

The topic ‘Duplicate Post via theme function or php’ is closed to new replies.

 * ![](https://ps.w.org/duplicate-post/assets/icon-256x256.png?rev=2336666)
 * [Yoast Duplicate Post](https://wordpress.org/plugins/duplicate-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicate-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicate-post/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicate-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicate-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicate-post/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Enrico Battocchi](https://wordpress.org/support/users/lopo/)
 * Last activity: [8 years, 8 months ago](https://wordpress.org/support/topic/duplicate-post-via-theme-function-or-php/#post-9567184)
 * Status: resolved