Site logo

Archived topic

Hiding GP Hooks option from child blog users

3 replies · Started by Benjamin on December 9, 2016

Viewing posts 1–4 of 4

(Reposting, as requested!) I am slowly moving the child blogs on ScienceBlog.com to GP Premium. I’d like to hide the GP Hooks option from users, but allow them to adjust the Customize settings that come with GP Premium (typography, blog, etc.) Is there a function I’m not finding here in the Support posts that could accomplish this? Thank you!

Hi there,

You can change the capability for the hooks page so it's only for network admins like this:

add_filter( 'generate_hooks_capability','tu_hooks_cap' );
function tu_hooks_cap() {
    return 'manage_network';
}

Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/

That should do it :)

Hi Tom. A follow-up question. I realize I actually wanted to hide the generate-options as well from child blog users. The snippet above works great via the Code Snippets plugin, btw. Can you tell me how to further hide generate-options? Thanks!

This archived topic is closed to new replies.