Site logo

Archived topic

Regarding Demo sites

13 replies · Started by saiprasad on October 18, 2018

Viewing posts 1–14 of 14

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.

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.

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.

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

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

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

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

Correct.

Another option is to do this:

add_filter( 'generate_dashboard_tabs', function( $tabs ) {
    unset( $tabs['Sites'] );

    return $tabs;
} );

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 ?

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 ?

Correct :)

Nice,Thanks :)

You're welcome :)

This archived topic is closed to new replies.