[Resolved] Regarding Demo sites

Home Forums Support [Resolved] Regarding Demo sites

Home Forums Support Regarding Demo sites

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #704284
    saiprasad

    Hi,
    Can I disable the Site library on my client sites ? Is there a way to do the same as I don’t want my clients to see the same inside their dashboard when I handover the sites to them.

    Please clarify me.

    Thanks.

    #704289
    Leo
    Staff
    Customer Support
    #704387
    saiprasad

    Hi,
    I have added the following code to the site using code snippet plugin, but the site library tab is still coming inside GeneratePress menu.

    add_filter( ‘generate_disable_site_library’, ‘demo_me’ );
    function demo_me()
    {
    return ‘true’;
    }

    Please help me regarding this.

    Thanks.

    #704398
    Tom
    Lead Developer
    Lead Developer

    Ah yea, best to do this:

    define( 'GENERATE_DISABLE_SITE_LIBRARY', true );

    wp-config.php is the best place to place it, but it should work if placed within your functions as well.

    #704408
    saiprasad

    Hi Tom,
    I have placed the above inside snippet plugin, but the same results.
    Site library still showing.

    #704418
    Tom
    Lead Developer
    Lead Developer

    Can you try placing it inside your wp-config.php file above this line:

    /* That's all, stop editing! Happy blogging. */

    #704426
    saiprasad

    Should I place it on the wp-config.php file ?
    So I need to use application like filezilla to place it on the server ?

    Is this the way I will do in the client sites too ?? Then it will be very difficult to place the code in the server of the client’s hosting πŸ™

    #704435
    Tom
    Lead Developer
    Lead Developer

    Correct.

    Another option is to do this:

    add_filter( 'generate_dashboard_tabs', function( $tabs ) {
        unset( $tabs['Sites'] );
    
        return $tabs;
    } );
    #704440
    saiprasad

    Yeah, now it’s gone Tom πŸ™‚
    Thanks a lot.

    Now both the “modules” and “site” tabs have disappeared.

    So just another small query Tom.
    If I am adding this code directly inside the theme function.php file, then where I will place it, bottom or which portion ? And if I do it this way, I should use the child theme for the safety, right ?

    #704443
    Tom
    Lead Developer
    Lead Developer

    It doesn’t matter where in the file, as long as it’s in there somewhere.

    Child themes are good for functions. There’s other options as well: https://docs.generatepress.com/article/adding-php/

    #704450
    saiprasad

    Great ! Thanks a lot again.

    So there are 2 ways. Either I use code snippet plugin to place the above filter code or use child theme and place that in the functions.php, am I correct ?

    #704451
    Tom
    Lead Developer
    Lead Developer

    Correct πŸ™‚

    #704455
    saiprasad

    Nice,Thanks πŸ™‚

    #704580
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.