3

I'm making my own theme and I just got this message while trying to activate my theme: "The active theme is broken. Reverting to the default theme." Live preview works, but when I select this theme it reverts back to a new theme. I have index.php and my style.css files set up as I was using this theme fine before. I've disabled all plugins and even tried a fresh copy of wordpress.

Is there any way to troubleshoot this issue and see what in my theme is breaking?

3
  • Check the style.css -> developer.wordpress.org/themes/basics/main-stylesheet-style-css
    – user145078
    Commented Jul 30, 2018 at 1:01
  • 1
    The comment at the top of style.css is not optional, and some of the components of it are required, without seeing the top of your style.css it's not possible to tell
    – Tom J Nowell
    Commented Jul 30, 2018 at 4:16
  • I have the same problem, but I am not even able to see the style.css sheet
    – Deya
    Commented Jul 24, 2019 at 10:10

1 Answer 1

1

You need to add some compulsary code in top of the style.css file

just copy and paste this commented code you can change theme name as per your requirement.

https://developer.wordpress.org/themes/basics/main-stylesheet-style-css/#example

/*
Theme Name: Twenty Seventeen

Theme URI: https://wordpress.org/themes/twentyseventeen/

Author: the WordPress team

Author URI: https://wordpress.org/

Description: Twenty Seventeen 

Version: 1.0

License: GNU General Public License v2 or later

License URI: http://www.gnu.org/licenses/gpl-2.0.html

Text Domain: twentyseventeen

Tags: one-column, two-columns

*/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.