After the second round of digging ...
It is TOTALLY easy!
You can restore my steps by running here , but the code is pretty clear:
add_action( 'init', 'remove_crap' ); function remove_crap() { remove_custom_image_header(); remove_custom_background(); remove_theme_support('post-formats'); }
You can see them in the code. Remove_theme_support accepts one of several lines that identify various parameters (in addition to only post-formats). The only problem I encountered is that they need to be called out of the hook (you can't just sketch them on functions.php). I use init
, but maybe another one that is more assigned.
The only thing I still do not understand is to remove the link to the Theme Settings page, which appears in the Appearances section. I know that it was added using add_theme_page()
, but there seems to be no convenient remove_theme_page()
.
UPDATE: I found it! This is VERY poorly documented, but in the end it's pretty easy to do:
add_action('admin_init', 'remove_twentyeleven_theme_options', 11); function remove_twentyeleven_theme_options() { remove_submenu_page('themes.php', 'theme_options'); }
In my example, theme.php targets the Appearances menu, and theme_options is the menu_slug used in the twenty-one theme. Obviously, these options will differ depending on which menu or submenu you are editing. This page will point you in the right direction.
ps: Here, how to get rid of templates from the parent theme that you do not want to use: THIS is not essential for my exact question, but it is closely related and probably useful for everyone who is trying to do what I do.
emersonthis
source share