- This topic has 13 replies, 3 voices, and was last updated 3 years, 7 months ago by
Tom.
-
AuthorPosts
-
October 18, 2018 at 8:48 am #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.
GeneratePress 2.1.4GP Premium 1.7.2October 18, 2018 at 8:55 am #704289Leo
StaffCustomer SupportHi there,
This should help: https://docs.generatepress.com/article/generate_disable_site_library/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/October 18, 2018 at 10:40 am #704387saiprasad
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.
October 18, 2018 at 10:55 am #704398Tom
Lead DeveloperLead DeveloperAh 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.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 18, 2018 at 11:01 am #704408saiprasad
Hi Tom,
I have placed the above inside snippet plugin, but the same results.
Site library still showing.October 18, 2018 at 11:08 am #704418Tom
Lead DeveloperLead DeveloperCan you try placing it inside your
wp-config.php
file above this line:/* That's all, stop editing! Happy blogging. */
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 18, 2018 at 11:13 am #704426saiprasad
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 π
October 18, 2018 at 11:22 am #704435Tom
Lead DeveloperLead DeveloperCorrect.
Another option is to do this:
add_filter( 'generate_dashboard_tabs', function( $tabs ) { unset( $tabs['Sites'] ); return $tabs; } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 18, 2018 at 11:30 am #704440saiprasad
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 ?October 18, 2018 at 11:34 am #704443Tom
Lead DeveloperLead DeveloperIt 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/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 18, 2018 at 11:38 am #704450saiprasad
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 ?
October 18, 2018 at 11:39 am #704451Tom
Lead DeveloperLead DeveloperCorrect π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 18, 2018 at 11:42 am #704455saiprasad
Nice,Thanks π
October 18, 2018 at 1:40 pm #704580Tom
Lead DeveloperLead DeveloperYou’re welcome π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.