Site logo

Archived topic

Hide Active Theme buttons

1 reply · Started by Kevin on January 11, 2021

Viewing posts 1–2 of 2

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

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/

This archived topic is closed to new replies.