remove_theme_support is not working.
-
Fresh and clean install of 3.8 with just a few blog posts moved over to it and Better WP Security installed.
When using the Skeleton theme, and making use of a child theme, the remove_theme_support methods do not work at all. I want to remove all CSS brought in via the Theme Options in the control panel. That is, the internal CSS that you actually see between the <head></head> tags. Not the external or inline CSS, the internal CSS that sits betwen <style></style> tags within the head, and which is specified by the Theme Options page when you click on a theme in the WP control panel.
My child theme’s functions.php looks like this:
function child_after_setup_theme(){ remove_theme_support( 'custom-header' ); remove_custom_image_header(); remove_theme_support( 'custom-background' ); remove_custom_background(); remove_theme_support( 'post-formats' ); } add_action('after_setup_theme', 'child_after_setup_theme', 11 ); function remove_skeleton_theme_options() { remove_submenu_page('themes.php', 'theme_options'); } add_action('admin_init', 'remove_skeleton_theme_options', 11 );
I have even tried to add
add_action('after_setup_theme', 'remove_theme_features', 11 ); function remove_theme_features() { $GLOBALS['custom_background'] = 'kill_theme_features'; $GLOBALS['custom_image_header'] = 'kill_theme_features'; } class kill_theme_features { function init() { return false; } }
But this also did nothing, and
add_action('after_setup_theme', 'remove_custom_background'); function remove_custom_background() { global $_wp_theme_features; unset($_wp_theme_features['custom-background']); }
Killed my entire site (blank page, both front-end and back-end).
Suggestions?
- The topic ‘remove_theme_support is not working.’ is closed to new replies.