How to Copy a Page in WordPress & Elementor

How to Copy a Page in WordPress Elementor Within 3 Steps

If you struggle to copy an Elementor page, no need to worry! Duplicating pages in Elementor is relatively easy. 

Copying can be crucial for your website because you may have a big website, and some pages will contain the same design with content varying here and there. In that case, creating page after page is very painful. 

What if we told you that you could duplicate pages in WordPress is the easiest way possible? Today, we will show you how to copy a page in WordPress Elementor, a world-class page builder plugin. 

It currently has more than 5 Million+ active installations. Let’s use Elementor to duplicate pages on your website. 

But first, check how to copy a page manually.

How To Duplicate a WordPress Page Manually 

This process is for those people who believe in do it yourself approach. You can copy a WordPress page using custom code. This method will save you some time by adding another plugin to your WordPress site and affecting the performance. 

However, if not installing another plugin is essential to you, this approach is acceptable and will work with the regular editor content and Elementor.

There is a catch. To use this code, you need to add it to either the functions.php file of your theme or a code management plugin like Code Snippets. If you add it to the functions.php file, use a child theme.

$current_user = wp_get_current_user();
	$new_post_author = $current_user->ID;

	/*
	 * if post data exists, create the post duplicate
	 */
	if (isset( $post ) && $post != null) {

		/*
		 * new post data array
		 */
		$args = array(
			'comment_status' => $post->comment_status,
			'ping_status' => $post->ping_status,
			'post_author' => $new_post_author,
			'post_content' => $post->post_content,
			'post_excerpt' => $post->post_excerpt,
			'post_name' => $post->post_name,
			'post_parent' => $post->post_parent,
			'post_password' => $post->post_password,
			'post_status' => 'draft',
			'post_title' => $post->post_title,
			'post_type' => $post->post_type,
			'to_ping' => $post->to_ping,
			'menu_order' => $post->menu_order
		);

		/*
		 * insert the post by wp_insert_post() function
		 */
		$new_post_id = wp_insert_post( $args );

		/*
		 * get all current post terms ad set them to the new post draft
		 */
		$taxonomies = get_object_taxonomies($post->post_type); // returns array of taxonomy names for post type, ex array("category", "post_tag");
		foreach ($taxonomies as $taxonomy) {
			$post_terms = wp_get_object_terms($post_id, $taxonomy, array('fields' => 'slugs'));
			wp_set_object_terms($new_post_id, $post_terms, $taxonomy, false);
		}

		/*
		 * duplicate all post meta just in two SQL queries
		 */
		$post_meta_infos = $wpdb->get_results("SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id");
		if (count($post_meta_infos)!=0) {
			$sql_query = "INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) ";
			foreach ($post_meta_infos as $meta_info) {
				$meta_key = $meta_info->meta_key;
				if( $meta_key == '_wp_old_slug' ) continue;
				$meta_value = addslashes($meta_info->meta_value);
				$sql_query_sel[]= "SELECT $new_post_id, '$meta_key', '$meta_value'";
			}
			$sql_query.= implode(" UNION ALL ", $sql_query_sel);
			$wpdb->query($sql_query);
		}


		/*
		 * finally, redirect to the edit post screen for the new draft
		 */
		wp_redirect( admin_url( 'post.php?action=edit&post=' . $new_post_id ) );
		exit;
	} else {
		wp_die('Post creation failed, could not find original post: ' . $post_id);
	}
}
add_action( 'admin_action_rd_duplicate_post_as_draft', 'rd_duplicate_post_as_draft' );

/*
 * Add the duplicate link to action list for post_row_actions
 */
function rd_duplicate_post_link( $actions, $post ) {
	if (current_user_can('edit_posts')) {
		$actions['duplicate'] = 'ID, basename(__FILE__), 'duplicate_nonce' ) . '" title="Duplicate this item" rel="permalink">Duplicate';
	}
	return $actions;
}

add_filter( 'post_row_actions', 'rd_duplicate_post_link', 10, 2 );

However, before using this code, you need to know that the snippet will enable duplication for both posts and pages. If you are looking to only allow it for one or the other, you can remove the page_row_actions or post_row_actions filter at the bottom of the code snippet.

How To Change Font Size in Elementor: Edit Your Typography Promptly

Deplucat Pages through Gutenberg Block Editor

If you don’t want to go through the hassle of using custom codes, you can also use the Gutenberg editor. It will also save you a lot of time.

You can quickly duplicate the content from the block editor. First, open the editor for the post or page you want to copy.

Click the three-dot icon in the top-right corner to expand the menu. Then, choose the option to Copy all content:

duplicate content Gutenberg- how to copy a page in WordPress Elementor

Now, create a new post or page. Next, click into the editor and paste the content. You can do two things like:

  • Use a keyboard shortcut like Ctrl + V or Cmd + V.
  • Right-click and choose paste.

Lastly, you will see an exact copy of the original content in the editor. But, you have to make sure to add the title, categories, tags, etc., manually.

Feeling like this is too simple? Well, with Elementor, you can easily customize the duplicated page. 

Read More: Adding Product Filter in WooCoomerce

How to Copy a Page in WordPress Elementor

You need to follow the below steps to copy a page in Elementor. 

Step 1: Hit the Update Button and Then Save as Template

When building a page and when it is time to save it, click on the arrow next to the “UPDATE” button to open the Save Options. When those options open up, click on “Save as Template.”

Click on Update and select Save as Template to duplicate pages in Elementor

Step 2: Give a Name to Your Page Template

Now you will see a popup that will ask you to name the new page template that you want to duplicate. So, go ahead and give your page template a name and then click on the Save button.

Give your elementor page template a name and save it

Step 3: Access the My Templates Area

Next, the popup box will remain so you can simply click on the “My Templates” tab on the top right.

Click on my templates in elementor

You need to click the  “Import” button next to the saved page template you wish to use, and you are all set. 

In this way, you can repeat the process and create as many duplicate templates as you want in Elementor.

FAQ

What are the shortcut keys for copying all pages?

In WordPress Elementor, there are no specific shortcut keys for copying all pages directly. However, you can efficiently manage this by using plugins like ‘Duplicate Post’ or ‘Yoast Duplicate Post’. 

These plugins allow you to clone entire pages or posts with just a few clicks, significantly saving time and effort, especially when managing content requiring uniformity across multiple pages.

Where is the copy style option in pages?

In Elementor, the ‘Copy Style’ option is a powerful tool found by right-clicking on any element. This option is handy for designers and content creators who want to maintain a consistent look and feel across various website elements. 

By using ‘Copy Style’, you can quickly replicate the style settings of one element and apply them to another, ensuring a uniform and professional appearance throughout your site.

How to duplicate a landing page in WordPress Elementor?

To duplicate a landing page in WordPress Elementor, use the ‘Save as Template’ option. This can be found in the ‘Publish’ settings on the Elementor editor. 

After saving your landing page as a template, you can reuse it for other pages, saving time and ensuring consistency in your website’s design. This is especially useful for marketing campaigns where you must create multiple pages with a similar layout and design.

Can you copy an entire page including header and footer?

Yes, in Elementor, it’s possible to copy an entire page, including the header and footer. By saving your page as a template, you can replicate the entire layout, including all sections and elements. 

This feature is invaluable for creating multiple pages with a similar structure, ensuring brand consistency and saving time in designing individual pages from scratch. It’s a great tool for quickly expanding your website while maintaining a cohesive design.

How to duplicate a page layout in WordPress?

Duplicating a page layout in WordPress can be easily accomplished with the Elementor ‘Save as Template’ feature or using third-party plugins like ‘Duplicate Post’ or ‘Yoast Duplicate Post’. This functionality is crucial for web designers and content managers creating multiple pages with a similar structure. 

By duplicating the layout, you can maintain a consistent look across your site, streamline the content creation process, and ensure that each page adheres to your desired design standards.

Ready to Create Duplicate Pages in WordPress?

So, now you know how to copy a page in WordPress Elementor. You don’t need to spend time creating pages that have the same design output content. You can use the above methods to duplicate any page. 

That will save you a lot of time, and you can use that time to focus on the other aspects of your website.

Best of luck!

Leave a Comment

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

Scroll to Top