Bulk creating pages

Hi Folks,

I know we can create a BB template from a page.

We have a page we want to duplicate about 20 - 40 times, each with a different page title, and slightly different page contents.

How would we bulk duplicate a page?

Cheers,
Steve

This isn’t possible in Beaver Builder or WordPress and you will need to use a third-party plugin to add bulk duplication.

We can use WP All Import, perhaps, but I don’t know if we use a page template for each page though.

If you’re using Beaver Builder then you will need to enable the saved template on a per page basis. However, if you have Beaver Themer installed as well. You can create a Beaver Themer singular layout and assign it to all pages and then use field connections so some of the content is dynamic such as page title, page content etc.

You can duplicate the page and change the desired info or you can save the page as a template and then apply on each page you want to use that as a starting point.

What if we wanted to duplicate a page 50 times, say?

you would need. to use WP-CLI

I have added support so you can run the command as many times as you want, it wont make 2.5.1 as that milestone is closed but it might make 2.5.2.

Shared with Zight

Here is the diff if you cant wait for 2.5.2

diff --git a/classes/class-fl-builder-wpcli-command.php b/classes/class-fl-builder-wpcli-command.php
index b594813f3..94fe99a72 100644
--- a/classes/class-fl-builder-wpcli-command.php
+++ b/classes/class-fl-builder-wpcli-command.php
@@ -200,6 +200,35 @@ class FLbuilder_WPCLI_Command extends WP_CLI_Command {
                        WP_CLI::success( sprintf( __( "Global option '%s' updated", 'fl-builder' ), $assoc_args['id'] ) );
                }
        }
+
+       /**
+        * Duplicate a layout/page/post
+        *
+        * ## OPTIONS
+        *
+        * [--id]
+        * Post ID to duplicate
+        *
+        *
+        * ## EXAMPLES
+        *
+        * 1. wp beaver duplicate --id=123
+        *      - duplicate id 123
+        */
+       public function duplicate( $args, $assoc_args ) {
+
+               if ( ! isset( $assoc_args['id'] ) ) {
+                       WP_CLI::error( 'No id provided --id=' );
+                       exit;
+               }
+               $id     = $assoc_args['id'];
+
+               $post_id = FLBuilderModel::duplicate_post( $id );
+               $url     = FLBuilderModel::get_edit_url( $post_id );
+
+               WP_CLI::line( $post_id );
+               WP_CLI::success( __( 'Layout duplicated', 'fl-builder' ) );
+       }
 }

 /**
1 Like

I think we can do this by using WP All Import.

We would first export the custom post type using WP All Export to understand the fields, adjust the CSV with new data, then import using WP All Import.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.