Skip to content
Advertisement

WordPress Theme: Standalone theme need index.php file ERROR

I suddenly got got an error when coding – wordpress -> theme: enter image description here

I don’t understand why this is the case as I have an index.php page. Also the css stylesheet is there as well. style.css also has the following commented

style.css

Theme Name: samirTheme
Author: samir
Author URI: www.wordpress.com
Version: 1.0
Description: This is a cool theme
Template: Test1

Here is the folder structure

enter image description here

New to wordpress. So confused as to why the theme is broken and not showing up in wordpress. Any ideas?

Advertisement

Answer

SOLUTION The solution way actually very simple. I found that it was really hard to find a good resource for the answer so I am answering here.

The style.css was missing: template: theme in the commented header i.e.

/*
 Theme Name:   samirTheme
 Theme URI:    http://example.com/twenty-fifteen-child/
 Description:  Twenty Fifteen Child Theme
 Author:       John Doe
 Author URI:   http://example.com
 Template:     twentyfifteen <--------------------------------------------
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
 Text Domain:  twenty-fifteen-child
*/
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement