How to Clone a New Edition

We recommend using the Duplicate Post plugin. Get it from: - then install and activate.

This plugin allows to clone a post or page, or edit it as a new draft.

In 'Edit Posts'/'Edit Pages', you can click on 'Clone' link below the post/page title: this will immediately create a copy and return to the list.

In 'Edit Posts'/'Edit Pages', you can click on 'New Draft' link below the post/page title.

On the post edit screen, you can click on 'Copy to a new draft' above “Cancel”/“Move to trash”.

While viewing a post as a logged in user, you can click on 'Copy to a new draft' as a dropdown link under “Edit Post” in the admin bar.

2, 3 and 4 will lead to the edit page for the new draft: change what you want, click on 'Publish' and you're done.

Pay attention to the new behaviour! The first way now allows you to clone a post with a single click, speeding up your work if you have many posts to duplicate.

There is also a template tag, so you can put it in your templates and clone your posts/pages from the front-end. Clicking on the link will lead you to the edit page for the new draft, just like the admin bar link.

In the Options page under Settings it is now possible to choose what to copy:

the original post/page date the original post/page status (draft, published, pending), when cloning from the posts list the original post/page excerpt the original post/page attachments (actual files won't be copied) all the children of the original page which taxonomies and custom fields You can also set a prefix (or a suffix) to place before (or after) the title of the cloned post/page, and the roles allowed to clone posts or pages.

Setting parameters on what not to duplicate

In Settings > Duplicate Post can set it to ignore certain relevant fields (e.g. edition_key) and taxonomies (i.e. categories or tags) so unique identifiers are not duplicated.

Template tags

added the template tag duplicate_post_clone_post_link( $link, $before, $after, $id ), which behaves just like edit_post_link(). That means that you can put it in your template (e.g., in single.php or page.php) so you can get a “Clone” link when displaying a post or page.

The parameters are:

link (string) (optional) The link text. Default: __('Clone','duplicate-post')

before (string) (optional) Text to put before the link text. Default: None

after (string) (optional) Text to put after the link text. Default: None

id (integer) (optional) Post ID. Default: Current post ID

Another available template tag is duplicate_post_get_original($id, $output) which returns the original post, either as a post object, an associative array or a numeric array (depending on the $output parameter), jus as get_post() does.

duplicate_post_get_original() relies on the _dp_original custom field.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Powered by Zendesk