An experienced WordPress Developer will tell you that a website today should have a minimal amount of plugins if any at all.
Benefits of using a limited number of plugins include:
- Improved website security
- Fewer plugin updates to maintain
- Less third-party code to rely on
- Faster loading website content
- Want to add to this list? Email me here.
I recently learned how to duplicate posts without a plugin by accident…
But what about pages?
Obviously, that would be beneficial too, right?
So, I added the last line of code to duplicate pages in addition to posts.
And since I have been using plugins like Duplicate Pages for some time now, I wanted to give this code snippet a test run.
After seeing it work without issue, I had to share it with you.
See below the exact code to add to your functions.php file that will allow you to duplicate pages AND posts without the need of a plugin.