[Support request] Hide Active Theme buttons

Home Forums Support [Support request] Hide Active Theme buttons

Home Forums Support Hide Active Theme buttons

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1614619
    Kevin

    Hey there,

    I want to remove (or hide) the “Active theme” buttons (Customize, Widgets, Menus, GeneratePress) from themes.php.

    I assume these are added by GP, not WP, but I just can not find where in the source code.

    I know I can hide with CSS but would prefer to use a hook/filter if one exists.

    Please and thanks! 🙂

    Screenshot = https://postimg.cc/YGP2zzVC

    Kevin

    #1615044
    Elvin
    Staff
    Customer Support

    Hi,

    I want to remove (or hide) the “Active theme” buttons (Customize, Widgets, Menus, GeneratePress) from themes.php.

    Any particular reason why you want them removed? These buttons access the exact same options you see under Dashboard > Appearance. Removing these seems pointless if you don’t remove options under Dashboard > Appearance as well as these buttons can be accessed regardless of the buttons removal.

    I assume these are added by GP, not WP, but I just can not find where in the source code.

    No, this is added on WordPress core files (themes.php). Here’s the actual code for this. See line 279 onwards.

    We don’t recommend editing this. Also, WordPress core issues are out of our scope, unfortunately.

    However, if you want the whole Dashboard > Appearance access, you can check this article.
    https://www.greengeeks.com/tutorials/article/hide-admin-menu-items-for-specific-users-in-wordpress/

    A wise man once said:
    "Have you cleared your cache?"

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