[Support request] Hiding GP Hooks option from child blog users

Home Forums Support [Support request] Hiding GP Hooks option from child blog users

Home Forums Support Hiding GP Hooks option from child blog users

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #253059
    Benjamin

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

    #253060
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #292271
    Benjamin

    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!

    #292463
    Tom
    Lead Developer
    Lead Developer

    Maybe a plugin like this would be best for that: https://en-ca.wordpress.org/plugins/adminimize/

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