• Hi,

    I have created a user role ‘teacher’, and I want to hide Astra Settings metabox when they edit posts. Is there any hook or filter I can use to remove that?

    Thank you for reading and your help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello @kghugo2000

    Most of the themes, do not provide a feature to hide the Meta Settings based on the User role.

    But there’s a free plugin – User Role Editor available on www.remarpro.com which can help you with this requirement to hide the Meta Settings for the Teacher User Role.

    I hope that helps.

    Regards,
    Suman

    Thread Starter kghugo2000

    (@kghugo2000)

    Hi,

    Thank you so much for your reply. Is there any hook or action for me to remove the meta setting completely for all roles?

    Thank you for reading.

    Hello @kghugo2000

    Yes, it will be possible but it will require a lot of customizations as per the user role and various other checks.

    I hope that clarifies.

    Regards,
    Suman

    @brainstormteam Thanks for the plugin recommendation, I’m also having the same problem. I’m using Profile Builder Pro’s roles editor add-on, but it doesn’t show the meta-box under the user roles capabilities. I would appreciate if you could give us the hook or action as @kghugo2000 requested. Also I would like to know which capabilities should be disabled using the User Role Editor plugin in order to hide the astra settings meta-box in post editor.

    Thank You.

    Hello @kuwjr

    You can add this snippet in your child theme’s functions.php file.

    Refer to this gist for the code.

    Also, you can adjust their custom conditions as per their needs in this code. (Like User Roles, Post Types)

    I hope that helps.

    Regards,
    Suman

    Thank You very much @brainstormteam I managed to do it ??

    Awesome, @kuwjr

    Glad to help you out!

    Do mark the topic as resolved if possible.

    Have a nice day and week ahead. Stay safe! ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to hide ‘Astra Setting’ metabox for specific user roles?’ is closed to new replies.