• Resolved anupalusoft

    (@anupalusoft)


    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!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Thread Starter anupalusoft

    (@anupalusoft)

    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

    add_action('wpmu_activate_blog','my_default_pages');
    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?

    WPMU has a commercial plugin available that can achieve this.

    Thread Starter anupalusoft

    (@anupalusoft)

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

    anyone help any idea how to do this?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    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 :/

    Thread Starter anupalusoft

    (@anupalusoft)

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add menu and pages automatically on registration multisite?’ is closed to new replies.