[resolved] Add menu and pages automatically on registration multisite? (7 posts)

  1. anupalusoft
    Posted 2 years ago #

    Hi everyone,
    Thanks in advance.

    What i really want is to automatically create pages (with permalinks) with blank content and add custom nav menu with custom items names and links on the time of registering new site on multi-site.

    Any script for doing it ? Where to place if any?

    Please help!

  2. anupalusoft
    Posted 2 years ago #

    Thanks for you reply Ipstenu,
    yes this plugin did allot for default BUT cant set default pages on new blog creation.

    i have tried this hook

    function my_default_pages(){
        $pages_to_create = array('About','Services','Tier Services','Contact');
    foreach($pages_to_create as $new_page_title){
                // Create post object
                $my_post = array();
                $my_post['post_title'] = $new_page_title;
                $my_post['post_content'] = 'This is my '.$new_page_title.' page.';
                $my_post['post_status'] = 'publish';
                $my_post['post_type'] = 'page';
                // Insert the post into the database
                $result = wp_insert_post( $my_post );

    it create pages but not in new blogs but in existing blog where we register.

    Any idea how to accomplish this?

  3. Shane Gowland
    Posted 2 years ago #

    WPMU has a commercial plugin available that can achieve this.

  4. anupalusoft
    Posted 2 years ago #

    @shane: any for free??
    I just want to add pages only ..??

    anyone help any idea how to do this?

  5. I thought http://wordpress.org/extend/plugins/default-blog-options/ let you do that, but it seems to be in a weird state where it's now a cloner :/

  6. anupalusoft
    Posted 2 years ago #

    woops!! you saved me. Thanks allot Mika. :)
    Though it adds pages but of those authors from which we copied but i solve this to work like what i wanted with some other plugin user role editor.

    Thanks again for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic