Podcast Episode

486 – Duplicating A Post or Page in WordPress

Announcements

Is there a plugin for that?

With more than 50,000 plugins in the WordPress repository, it’s hard to find the perfect one. Each week, I will highlight an interesting plugin form the repository.

For more great plugins, download my 50 Most Useful Plugins eBook.

Show Free for WooCommerce shows the text Free instead of $0.00 for WooCommerce products with no price.

Duplicating a Post or Page in WordPress

Today we talk about the two different ways to duplicate content on your WordPress site.

The two plugins we referenced are:

Thank You!

Thank you to those who use my affiliate links. As you know I make a small commission when someone uses my link and I want to say thank you to the following people. For all my recommended resources, go to my Resources Page

Full Transcript

Business Transcription is provided by GMR Transcription.

On today’s episode we are going to talk about how we can clone our content, how to copy any page or post in WordPress right here on Your Website Engineer podcast episode No. 486.

[music] Hello and welcome to another episode of Your Website Engineer podcast. My name is Dustin Hartzler, and today is the 486th day of the quarantine, not really that many. But it does certainly feel like I have been here a really long time, and nobody has been leaving the house. We are good and well here in Ohio, and I hope you guys are all well as well. And I just wanted to give an update that we are still in the middle of this thing, and we have got a couple more weeks in Ohio until they reevaluate, so we are at the stay-home orders through the rest of April, and then we will evaluate. I am very certain that the kids will not go back to school, and that they will be here until school resumes in August which is a lot of months away. I finally was able to find a quiet time to record that is during the day, and then of course, the neighbor’s mowing service, they just showed up, and they just got started.

But anyways, let us go ahead and dive right into what is going on in the WordPress world this week. The first thing is that there is an article on WP Tavern talking about the state of WordPress Meetups under the lockdown, and I guess most people that have been attending local WordPress Meetups are probably now on to the online version. And they are going in just kind of hanging out on Zoom and talking, and it has been kind of interesting and kind of neat that I have been asked to speak at the WordPress Meetup for Columbus which is usually not really easy for me to drive an hour-and-a-half to their meetup and then drive an hour-and-a-half home. Three hours roundtrip for an hour meeting does not make a lot of sense, but to be able to do that from home and just talk online and share a presentation there would be kind of pretty cool.

And so, that is really a neat thing that is happening, and that is just not locally but that is globally, folks are starting to use Zoom. So, if you want to read more about that article, you can over on WP Tavern. Another thing that is happening this weekend, April 18, is WordCamp Santa Clarita is happening, and it is going to be online. It is scheduled to be online, you can go ahead and get your virtual tickets, and stay in-tuned in what is going on in Los Angeles County. And that is what is happening there, but you can view it from wherever you are in the world, so it is one of the first. There has been a couple that have went online, and then this is another good test to see if it is capable for live streaming and doing things online.

So, if you are interested in that there is a link in the Show Notes for that, and then also online, is going to be WordCamp Europe 2020 is now moving online as well. It will still take place over the same time, June 4 – 6, and there is a Virtual Contributor Day on June 4 followed by two-and-a-half days of live stream talks and workshops. And so, the attendees, access will be free. They will be releasing information soon on how you can join in. There will be sponsors and speakers and all kinds of things happening. They still are on-plan to do WordCamp Europe 2020 is planned to take place in Portugal, but they have gone to move to online versions this year, and it is really interesting.

And it is neat to be able to go to a huge event like this, WordCamp Europe, and see some of the brightest minds in the Europe area to speak about WordPress. And so, if you are interested in that, I will try to keep an eye out of when they open registration and how we can sign up for that because that will be exactly a fun time and just a great time to learn and be interesting to see how a large WordCamp does that. So, that is the news for this week.

I did have a plugin that I want to share with you this week, and some of these plugins that I find are just really interesting. And some of them in the WordPress repository, there is 50,000 plus of these things, and some of them are real basic. Some of them are real intense and have tons of code and do lots of things. This one is one of the most basic ones that I could find, and it is called Show Free for WooCommerce. And this plugin will display the text “free” instead of “$0.00” for WooCommerce products that do not have a price, and I am like, “Man, this has got to be an easy plugin.” So, I went ahead and I downloaded and I opened it up. And it is actually eight lines of code, and it could be smaller. It could be compressed, but that was eight lines including the comments and so, that is all it is.

It is just a small filter. It is filtering anything with the text of “$0.00”, and it is changing that to “free”, very, very simple. You could just add it as a snippet inside of a Code Snippet’s plugin or your functions.php plugin which I do not recommend. I always recommend going the Code Snippet route, and it is just a simple thing. So, if you needed this and you did not necessarily want another plugin installed, you could just download it, grab the text, put it in a Code Snippet’s plugin, and then you are off to the races. So, I thought I would share that. I get this question every once in a while at WooCommerce. They just want to show “free” instead of “$0.00”. “Free” just kind of – I do not know. It feels like it is free and – I do not know. It is just a different way to display text in your WordPress site, your WooCommerce site. So, that is the Plugin of the Week that I want to share with you today.

All right, let us go ahead and talk about how to content clone or clone your content and how to copy a page or post inside off WordPress. And I have been using this plugin for years. Maybe I have mentioned it here on the show before, but maybe I have not, so I wanted to highlight that can and kind of give it a small, little review. And that is called the Duplicate Post plugin. It allows you duplicate any WordPress post or page and specify additional content that should be copied including comments, dates, and slugs. And so, this is, like I said, a plugin, so to start using it you have to go and download the Duplicate Post plugin, and then activate it. That is pretty simple, but it is ready to use out of the box.

Before you start copying content you should take a look at the plugin settings first just to make sure there is no changes that you want to make. So, to review the settings, those are under Settings > Duplicate Post, and then it has different options. So, there is three different sections there, What to Copy, Permissions, and Display. The What to Copy, it gives you, in general, the things that you want to copy. So, I believe the default checkboxes are Title, Date, The Excerpt, Content, Featured Image, Template Format, and Menu Order. Those are the default things that are chosen there, but you can also replicate the status, the slug, the author, the password, the attachments, the children pages, the comments. You can do all of those, so you want to make those necessary adjustments first.

Probably if you are making a duplicate page or post you probably want to duplicate the title, the dates, maybe the – I do not know, the content, maybe the excerpt. It just depends on what you are looking to duplicate, and just makes it a lot easier to get started, maybe if you just do the date and the content or the title and the content, and get you started. By default, the Duplicate Post clones your post, and creates a copy with the exact same title as the original post or page. And to create a clear distinction between the original and the copy, you can add a prefix or a suffix that will automatically be added to your duplicate post. I believe it always says “copy of”. That is the main thing.

It says “copy of” if you do nothing, but you can change that to “duplication of” or “new posts,”. You can put anything in there that you want. You can also put at the end, maybe, you put “duplicate” or put a number or “x2” or whatever, and so you can do that. And then you can save all of those changes as well. And then you want to, in the Permissions tab, you can ShareThis feature with other WordPress people. So, if you want to give administrators or editors or authors, contributors, those types of folks, if you wanna give them the ability to have different permissions, if you want them to be able to do that, you will have to add that to their Permissions box.

Once you get those settings setup, then you will want to go back to either a page or a post, you can go to that section. And where you hover over the title of the post, usually there is Edit Quicker, Edit, Trash, and View, there is gonna be two new options, and one is Clone, and one is New Draft. The Clone duplicates the page or the post but does not open it for editing. You should select Clone if you do not need to make any changes right away or you do not plan to make any changes just yet. And then the New Draft creates a duplicate page or post, opens the WordPress Editor, and you can use this when you are ready to start making changes right away.

Now you do not necessarily have to do this from the All Posts page or the All Pages page. You can actually do this inside of, there is two different ways that you can do it, inside of the post that you are editing or the page that you are editing. So, on the right-hand side and near the button where you Publish or hit Update, there is an area right above the Move to Trash link, and it says “copy to a new draft”. So, you can copy it to a new draft there. There is also a place up in the Admin Bar, so that is the black bar that goes across the top of your page. There is something that is called or there is a link there that is Copy to New Draft, and so, you can do that straight from a page anytime that you are looking at the post. You can do that on the frontend or you can do it on the backend which is super helpful.

You can also clone multiple pages if you need to. So, maybe there is two or three pages you want to make edits to or you wanna make duplicates and maybe change dates or change times or things like that, then inside of the All Posts or All Pages page, you can go ahead and select the checkboxes, one, two, three, four, or however many you want. And then under Bulk Actions you can select the option for Clone, and that will copy all the selected pages or posts. Now, you might say, “Dustin, this is great. I do not necessarily need this extra plugin for something that I do maybe one time per year or very, very infrequently.

So, the beauty of using WordPress is there is different ways to do this, and the cool part is if you have a Gutenberg, there is a section where you can Copy All Content, and to do this, it is in the Editor field or the Editor mode. And so, you will go into your Editor, you will open up the post or page, and you will go view the Editor. And then in the upper right-hand corner, there is three vertical dots, and you click on those three vertical dots, and it gives you options for View if you wanna access or see the toolbar or do Spotlight Mode or Full Screen Mode. It also gives the option for Visual Editor and Code Editor, and then at the bottom of the Tools section, there is something that is called Copy All Content.

And then you can go and you can open up a new post, and once you add the new post and tab down to the Block Editor, and then hit Paste, and then all of that content will be duplicated. Now, that is only gonna do the body text, that is not gonna go in and make adjustments to the title and the comments or the categories and all that stuff that is included with a post. That is not gonna happen with the Copy All Content with Gutenberg. So, it is not the exact same, but if you are not doing this very regularly – one of those things that I like to do when I am making duplicates of and things, if I am doing it in a manual way, then I normally will open up two web browsers. There will be one on the left and one on the right, and maybe the one on the left has the current copy, and it has got all the things selected.

I did this really early on when I was making my podcast and editing these Show Notes every single week. It is like, “What did I do here and what did I do there?” Then I just opened it up in two windows, and then that way I could kind of cross-reference, “Okay. Oh, it is in this category. I need to set the featured image. I need to do this. I need to fill out this field. I need to make sure that all of this is matching up,” or whatnot. And so, that is a good way to do it if you are just copying the main content of the post or page and then needing all that rest of the information.

And now, unfortunately, this does not work, the plugin does not work with custom-post types, custom fields, or different things like that. So, it is only gonna work on posts or pages. And so, I guess one of the things that you could do, there is another plugin called Post Type Switcher, and this plugin will allow you to switch what type of post it is. So, maybe if you do want to copy a different piece of text from a custom-post type or maybe it is testimonial, maybe it is a author post, something that is not a post or a page, you can use this plugin called Post Type Switcher and switch it to the appropriate thing.

So, what you would do is you would go in. Let us just say that it is about the team. Maybe you want to duplicate some content about a specific person on your team, and that is not a post or a page. It is in a separate section of your WordPress site. Then what you would do is you would, probably what I would do is, you would move that from a post or move that from the About Us page or About the Team or whatever. You use the Post Type Switcher and change that to a post or a page. Then duplicate it, and then once it is duplicated, then you can move them back to the proper thing. It is, obviously, a hack and a workaround, but is a way that you could get around the ability to copy content that is outside of a post or a page.

And I will have a link to the Show Notes for the Post Type Switcher. I used this plugin one time when I was creating, I was actually moving all my podcast Show Notes. I wanted them to be in separate section in my website. So, instead of them being posts, I wanted them under a section called Podcasts, and so, I created a custom-post type and wanted them all there. So, then I had to go in and manually, one at a time, change them from post, and then change it to podcast. And then I was able to switch them all over, and I had to make some other adjustments. I did that a couple years ago. I am really happy with that. And this is just a good way to go ahead and make some changes, and change them from one place to another without having to copy them and change the formatting and whatnot.

So, taking or creating a page and, “Oops, this should have been in the Team rea or the Portfolio section,” and then having to just copy and paste all that content, you can use a plugin like Post Type Switcher to switch them from page to posts or posts to custom or custom to custom or whatever you may be looking for. So, that is what I want to share with you this week, just a basic thing. Hope that you are doing well, and you are staying 6 feet apart from everyone else, a couple meters apart, and hope that you are enjoying the start of spring if you are in the Northern Hemisphere and just getting ready for some warmer weather and hopefully some time that we can spend with our friends and get close to people again in the near future. But that is what I wanted to share with you this week. Take care, and we will talk again soon. Bye-bye. [music] For more great WordPress information, head on over to yourwebsiteengineer.com.