Skip to:

Default pages creation

  • 0p0


    Hello! I recently installed WPMU + buddypress to run a brand new community.

    There is one feature we want to get working but I don’t know how to achieve it.

    When you first run a WordPress installation it comes bundled with a default “About” page. Is it possible to make an installation where more default pages are created for our users like a “Portfolio” + “Profile” + “Blog” pages so htey don’t have to crate them?

    It would be also useful to have the ability to deactivate permalink editing for those pages and the addition of more pages, but keeping access to the content editing of course; the aim is to make a Myspace-like site with the flexibility of having different pages in the site for every user but with the advantage of standarizing site layout through the entire community so the users concentrate on social connection and content publishing and not worrying them with themes and site structure stuff; It is an art oriented community so we want to give everybody the same basic features so they may share and connect within the community and publish their works to non-users/general public on their public WP sites.

    Thanks in advance for any help :)

Viewing 4 replies - 1 through 4 (of 4 total)

  • stefk


    Did you manage to do this? As i would like to do the same thing and would appreciate the help and advice.





    yes please.. I am too look forward to develop a art community. And need to have this sort of functionality..

    Also can u point me to your community to see what all features you have managed with BP .. I want to have a page created everyday like DailyDeveations feature of

    That can be accessed using a calender.

    The post will from different users all over the site.

    John James Jacoby




    I can’t provide buddypress specific code as I have not yet read through it, but here is the code that I use to have pages automatically created for new blogs when they are setup.

    Anyone with bp experience who knows the function names could easily change my code to bp appropriate code. [replicate the code as often as needed in the custom function file for as many pages as you need]

    function change_newblog_defaults( $blog_id, $user_id ){
    global $wpdb, $current_site, $wp_rewrite;
    //–change to new blog
    //make page
    $wpdb->insert( $wpdb->posts, array(
    ‘post_author’ => $user_id,
    ‘post_date’ => $now,
    ‘post_date_gmt’ => $now_gmt,
    ‘post_content’ => __(‘This is the content’),
    ‘post_excerpt’ => ”,
    ‘post_title’ => __(‘Pagetitle’),
    ‘post_name’ => __(‘Pagename’),
    ‘post_modified’ => $now,
    ‘post_modified_gmt’ => $now_gmt,
    ‘post_status’ => ‘publish’,
    ‘post_type’ => ‘page’,
    ‘to_ping’ => ”,
    ‘pinged’ => ”,
    ‘post_content_filtered’ => ”
    ) );
    //inserted id
    $page_id = $wpdb->insert_id;

    //change template inserted page
    $wpdb->query(“insert into $wpdb->postmeta (post_id,meta_key,meta_value) values ($page_id,’_wp_page_template’,’templatefile.php’)”);
    //restore blog
    add_action(‘wpmu_new_blog’, ‘change_newblog_defaults’ );

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Default pages creation’ is closed to new replies.
Skip to toolbar