I am using the child theme and have renamed it to the new theme name. However, the parent theme is still viewable in the admin area with the original theme name. How do I hide the parent theme? Thanks.

1
1

There is a filter called wp_prepare_themes_for_js in wp-admin/includes/theme.php in the wp_prepare_themes_for_js() function, which is called by wp-admin/themes.php to populate the theme set. That filter will allow you to remove themes from the list. Of course, you have to know the theme name.

function kill_theme_wpse_188906($themes) {
  unset($themes['twentyten']);
  return $themes;
}
add_filter('wp_prepare_themes_for_js','kill_theme_wpse_188906');

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *