Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Samuel Johnson
Samuel Johnson
9,152 Points

Wordpress Nightmare!

So ive been working on a custom theme in wordpress, have just finished pretty much everything needed for launch and editing as usual, came back to my computer and now its reverted back to the orginal theme??

Says my theme is broken containing no template, however i have an index.php file?

Ive then checked using the editor to see what files are available and it only allows me to see my css files?

any suggestions?

3 Answers

Samuel Johnson
Samuel Johnson
9,152 Points

Thanks for your answers guys, after messing around with it for over 4 hours ive actually just solved it.

I found out your point Ralf Koller that the style.css file had to be in the root directory, what was weird is for the duration of the project ive been editing it fine in a /css/style.css location with no file in the root folder.

Then what i worked out it if i save the styling sheet in the root folder on sublime editor then move it across to the /css folder it works fine (although you cant edit from the wordpress dashboard)

Some of my backgrounds wouldn't load unless the style.css file was in the css folder so i created another css file in the css folder containing these styling elements and it was all solved.

Thanks for your time and answers!

I will be sure to check out that them-check plugin though!!!

the style.css file is what registers the theme, check to make sure the style.css file is named correctly

you have to add that the style.css has to be placed into the root of the theme folder and its version header has to contain a few necessary facts: http://codex.wordpress.org/Theme_Development#Theme_Stylesheet

aside that you also need a screenshot.png in the themes root folder(880px x 660px)

if it is still not working you might check out the following plugin: http://wordpress.org/plugins/theme-check/