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

Jenny Chan
Jenny Chan
6,905 Points

WP Theme Tutorial - Broken Template

I was following along fine in the Wordpress Theme Development Tutorial until the "Adding Widgets" episode. I installed TwiGet, dragged it to the left footer, fiddled around with the widget...and then my theme complete disappeared.

When I went to Appearance > Themes, WP says "The template is missing."

What does this mean and how can I fix it? Thanks!

4 Answers

I have not taken this tutorial yet, but I know a lot about WP. Sometimes, an error in the code can make this things happen, specially since PHP is so strict. Maybe there was something modified on the code while you were installing the widget? did you do this through the backend or in the code?

Jenny Chan
Jenny Chan
6,905 Points

I installed the plug-in (TwiGet) through the admin site through the Widgets page. I dragged the widget to my widget area, refreshed the page. No tweets were displayed, but my theme was working fine. I thought it was a problem with the Twitter user name I used, so I went back and added @ in front of my handle...and that's when my site went haywire.

Gautam Thapar
Gautam Thapar
5,265 Points

That is why it is important to read teacher notes written below the video.

UPDATE: THe TwitGet widget used in the video has not been working properly since the latest Twitter API update. Please try using the following Twitter Widget Plugin instead:

Twitter Widget Pro

Disable and uninstall the TwiGet plugin. Although it has nothing to do with breaking your theme.

It tried to replicate the issue but no success. My theme works fine even after adding '@' before the username.

'The template is missing' means Wordpress can't find the style.css in your theme folder. And if style.css is present then make sure it is well commented out. Check this video - The Main Stylesheet

Hope it helps! :)

Cory Lawrence
Cory Lawrence
10,222 Points

The same thing happened to me after I installed the Treehouse Badges plugin. I checked my style sheet, uninstalled all the plugins and I have all the necessary php files, but I still can not get it to work.

Cory Lawrence
Cory Lawrence
10,222 Points

I figured it out. When I downloaded the project files, the style.css file was in the main theme folder, not in the css folder (This is where they put it throughout the tutorial). I moved my style.css file into the main theme folder and my theme was no longer broken. Then when I moved the style.css file back into the css folder it took on my styles again. Does anyone understand what could cause Wordpress to not recognize the style.css file when all I did was move it out of and back into the css folder to make it work again? Thanks!!