In my WordPress theme that I’ve currently been building I do not take advantage of the WordPress Theme Customization API. As much as I would like too, I’ve invested far too much time into my own personal theme options framework for changing things.
This leads me to my question. How do I remove the blue, “Customize Your Site” button from the dashboard as well as link shown when viewing Appearance > Themes? I did some Googling, but my Google-Fu failed and couldn’t find a solution that didn’t use CSS or Javascript.
Ideally a hook to remove it would be best. But if there is no clean way to do so, a JS and or CSS solution would be fine.
With the lastest version of WordPress (4.3) you can now natively remove the customizer’s theme switch setting without resorting to CSS hacks.
In the latest version of WordPress, the themes section is a panel, so it must be removed as follows:
This will fully remove the menu option:
Other answers don’t remove it if you are on another subpage + you hover themes menu (you’ll see it in submenus)
There are no hooks to that part of the Dashboard.
It has to be done with CSS (or jQuery if you want to convert it in another thing).
[update]
As pointed by @helenhousandi in a comment:
So, another approach is to remove the action hook and recreate the
wp_welcome_panel()
function, like so:And
my_welcome_panel
is a replica ofwp_welcome_panel()
adapted as one wishes.Please, also note her observation: my emphasis
You need to Pass the following code at function.php