[Support request] Disable GP Site Library

Home Forums Support [Support request] Disable GP Site Library

Home Forums Support Disable GP Site Library

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #535020
    konceptuel

    Hey there,

    how can I disable GP Site Library on live website?
    I appreciate the feature very much, but I just want to prevent anyone from accidentally importing a new demo site once we’re live.

    #535349
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    There’s a filter we can use: https://docs.generatepress.com/article/generate_disable_site_library/

    Let me know if you need more info ๐Ÿ™‚

    #567840
    johlor

    I just updated and saw the new Sites. I tried following your instructions to disable it and nothing has changed. I’m using Code Snippets. Here’s the code I built from your example.

    add_filter( 'generate_disable_site_library', 'johlor_no_sites' );
    function johlor_no_sites()
    { 
        return 'true';
    }

    What did I miss?

    #567911
    Tom
    Lead Developer
    Lead Developer

    You might have to do this:

    add_filter( 'generate_disable_site_library', '__return_true', 20 );

    Let me know ๐Ÿ™‚

    #568403
    johlor

    Still there.

    #568593
    Tom
    Lead Developer
    Lead Developer

    Alright, that means your Code Snippets plugin is firing before GP Premium.

    So, let’s do this:

    add_action( 'after_setup_theme', 'tu_disable_site_library' );
    function tu_disable_site_library() {
        add_filter( 'generate_disable_site_library', '__return_true' );
    }
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.