• I know there are various plugins to mass edit pages but is there something that allows me to create a bulk of pages at once?

    I have searched through the plugin directory in vain but perhaps I am missing something.

Viewing 13 replies - 1 through 13 (of 13 total)
  • Michael Torbert

    (@hallsofmontezuma)

    WordPress Virtuoso

    That would be simple to write, but what would be on them?

    Maybe he means something like this

    Write Page

    Mass Page Creator

    Title | Description
    ——————————————————————–
    1.Candle Type 1_____________ | This Candle is Shaped like ????
    ——————————————————————–
    2.Candle Type 2_____________ | This Candle is Shaped like ????
    ——————————————————————–
    3.Candle Type 3_____________ | This Candle is Shaped like ????
    ——————————————————————–
    4.Candle Type 4_____________ | This Candle is Shaped like ????
    ——————————————————————–

    And So on.

    It’s a great idea, btw.

    Thread Starter betadog

    (@betadog)

    Exactly.

    I am using WordPress as a CMS and sometimes I just want to create a bunch of pages at once. Ideally Mass Page Creator would ask me for the individual page titles and then create of all them at once with the same attributes (e.g. subpage of…, no comments, published etc.)

    Daddy has a lot of candles to sell 😉

    I would be interested in this plugin as well.

    I suppose no one’s been able to find anything so far?

    Might as well make them manually. asking on the forums is pretty futile now.

    This is way easier to do from outside WordPress… Create one page, note its ID, and then clone it to your heart’s content via a freeform PHP script or an SQL batch file… Something along the lines of:

    <?php 
    
    // Let's pretend that connection to the DB server
    // has been established and the DB selected...
    
    $myPageID = 1234;
    $myPostsTable = 'wp_posts';
    $select = "SELECT * FROM {$myPostsTable} WHERE ID = '$myPageID'";
    $myResult = mysql_query($select);
    $myPage = mysql_fetch_assoc($myResult);
    while ($morePagesNeeded) {
      $myNewPage = $myPage;
      $myNewPage['post_content'] = 'Content of the Page.';
      $myNewPage['post_title'] = 'Page title';
      $myNewPage['post_name'] = 'page-slug';
      $myNewPage['guid'] = 'http://www.example.com/pages/page-slug';
      $firstField = true;
      $insert = "INSERT INTO {$myPostsTable} SET ";
      foreach ($myNewPage as $key => $value) {
        if (strtoupper($key) == 'ID') {
          continue;
        }
        if ($firstField) {
          $insert .= $key
            . " = '"
            . mysql_real_escape_string($value)
            . "'";
          $firstField = false;
        } else {
          $insert .= ', '
            . $key
            . " = '"
            . mysql_real_escape_string($value)
            . "'";
        }
      }
      mysql_query($insert);
    }
    
    ?>

    Obviously, the fields in $myNewPage will have to be populated from somewhere (CSV file or perhaps constructed dynamically) and $morePagesNeeded has to be replaced with some realistic condition, but I hope you get the picture…

    Thanks for the input NC@WP. I did go ahead and build the Pages manually, but your method is very interesting…

    This idea for a plugin intrigues me. I’m going to have a look at the process and see if I can make something that does the job. It would likely be an admin panel that gives options like page title, page content and page status which would then be incremented.

    Should be interesting.

    oh_hello,
    I’ve successfully made a plugin that does the job! RIght now I’m ironing out some of the kinks from my test platform, and should be able to have a plugin hosted in a few days.

    For those people looking for a solution to this problem, I have a plugin available at my blog. Once the submission is accepted to the plugin directory, it will be available there as well.

    http://www.wesg.ca/2008/06/wordpress-plugin-mass-page-maker/

    Wonderful.

    Thank You wesg!

    Just noticed this. It will surely be helpful in the future, thanks so much wesg!

    Thread Starter betadog

    (@betadog)

    Thank you very much wesg, great job!

    BTW: I am new to the WordPress community and so far I am blown away by the responsiveness and the level of support here. Truly amazing!

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Looking for a plugin to mass create pages’ is closed to new replies.