How to clone pages and posts in WordPress without a plugin ?

In this article, we will discuss how to clone pages and posts in WordPress. There are many factors to clone or duplicate pages and posts in WordPress. For example, if your work creates a great page several times and requires nearly exact pages, with the exception of titles and just a few contents, you can copy and paste, clone existing pages can. It was easy, so you did not have to recreate everything to make a new page at any time.

It’s not worth investing your time twice when you can actually save it just by the clone of a desired page or post to WordPress with a single click, to make it many available plugins that allow you to clone your post or page. But here I am giving a simple, lightweight code to achieve this. Please follow the code snippet below and enter this code in the current function.php theme, add it to a new plugin, or click on the github button below to get the complete source code.
How to Duplicate Posts and Pages Without Plugins

How to Duplicate a WordPress Page or Post without Plugin.
Note: Please make a note below all the code snippet is self explanatory, if you have any questions please comment on us.
1.Add the clone link to action list for post and pages.

2.Add a helper method to create drafts for posts and pages.

3.Add a helper method to get all current post meta and set them to draft post or page.

4.Add a helper method to get all current post terms and set them to draft post or page.

5.After clicking the clone link, initialize the administration action and clone the post or page.

Certainly, I wonder why you do not know about it. Never be late! I hope to answer all the questions in the above article and know how to duplicate or clone Posts and Pages in WordPress, then please Subscribe to ScriptHere.Com by Email. You can also find us on Facebook and Twitter. If you have any comments or queries, please do the following in the comments section.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.