Duplicate A Page

I was wondering if you had any suggestions on how to duplicate a page AND KEEP the format and all the widget work? For example, I have the page https://starconversations.com/intro-free/ and want to copy the exact thing but with a different ending url (and instead of /intro-free have it be /postcardpromo ) for the purpose of analytics and seeing which branding draws in more people. So the page would be exactly the same, just a differnt ending url. Any ideas on how to easily duplicate or copy a page for this purpose?

Hi, There is a Duplicate Post plug-in that allows you to clone pages and posts with one click

So here is what the duplicated page looks like using that plugin: https://starconversations.com/intro-free-2/

The problem is that everything on the original page was done via the widgets. Can I copy everything I did with the widgets? Or is there another way to copy all the widget information to another page?

Hello there,

Basically, each time a new page that widgetized template enabled, a new associated sidebar area (in the Appearance > Widgets) will created which is identified by its page title. That’s why duplicate post isn’t working.

The possible solution for it, is assign other page’s widget area manually by editing the code in the page_widgetized.php file of the theme. To retain the code changes, you have to create a child theme. Read this codex or you can use a plugin like Child Theme Configurator.

Then in your child theme, create a new folder and name it as page-templates, in this folder you’ll need a copy of page_widgetized.php file from main theme. So you’ll have child_theme_folder/page-templates/page_widgetized.php. In child theme’s, find this line:

    <?php $slug = $post->post_name; ?> 

Replace it with:

    $slug = $post->post_name;
    if( $post->ID == 321 ) {
      $slug = 'homepage';

Replace 321 with your new page ID number. You can get it when editing it; in your web browser’s address bar you’ll see a URL that read: yoursite.com/wp-admin/post.php?post=321&action=edit. In your case, it’s 2881.

To display the widgets as seen on this page which the slug name is intro-free, in the code above, replace this line:

   $slug = 'homepage';


   $slug = 'intro-free';


Hmmm, here is a screenshot of my new file in my child theme: https://starconversations.com/wp-content/uploads/2018/02/Screen-Shot-2018-02-08-at-11.49.04-AM.png

But it still didn’t work. Did I miss a step? Here is the new page that was duplicated (as you can see, it is still empty). https://starconversations.com/intro-free/intro-free-3/

Hello there,

I found the page ID doesn’t match. It should be 2883

29 AM


How do I make the page ID match? It should be2883? Isn’t that what it is now? Does it need to be the page id of the page I want it to look like (1979?) or do I need to add 2882 somewhere?__