• kb123

    (@kb123)


    Hello,

    Is it possible to have newly created sub-sites created with the Search Engine Visibility box checked, so that the site is not indexed until I am ready for it to be? Also saving me time from having to visit each site and check the box manually.

    I am in the process of starting up a large project and this would make it much easier if there was some code I could edit somewhere, or any other way of doing this.

    Thanks,
    Ken

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

    (@ipstenu)

    ?????? Advisor and Activist

    Thread Starter kb123

    (@kb123)

    Cool Plugin, Thanks.

    But I do not see any option in there for what I am trying to do.

    Any other ideas?

    Thanks

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Cheater way:

    if ( '0' == get_option( 'blog_public' ) )
       set_option('blog_public', '1');

    That forces it on always.

    Want to run only on activation?

    add_action('activate_blog','my_activate_blog');
    
    function my_activate_blog(){
        set_option('blog_public', '1');
    }

    Toss one of those in an mu-plugin and off you go.

    Thread Starter kb123

    (@kb123)

    Thanks Mika,

    Could you just point me in the direction of which file to add the 1st piece of code there to?

    Also, I will still be able to turn that off thru dashboard when I am ready for the site to be indexed, correct?

    I have no Idea on how to create plugins, so I think I better leave that 2nd part alone.

    Thanks so much,
    Ken

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    As I said

    Toss one of those in an mu-plugin and off you go.

    Don’t know what that means? Read https://halfelf.org/2012/mu-plugins-are-good/ or google ‘mu-plugins wordpress’ ??

    BOTH code bits would go in an mu-plugin. Welcome to Multisite administration, you get to learn how to make one now ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Search Engine Visibility Default On?’ is closed to new replies.