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

Activating a Custom Theme

I've followed the tutorials word for word, but my custom theme isn't showing in "Available Themes." I've created all the right php files, and have pasted the theme info comment copy into style.css. Did I miss something? Is there a way to get around this, besides zipping the files and installing them as a theme, as I'm not sure this will affect how I build on the files later?

Any help would be great,

Thanks!

6 Answers

bump?

Kevin Korte
Kevin Korte
28,149 Points

As long as you have the correct meta data posted as a comment block in the style.css file, and have an index.php file those are the only two files you need to have a theme.

The theme files have to be in their own file within the theme's folder inside the wp-content folder.

Also make sure your style.css file is in the root of the theme's folder. That is where WP will look for it when it loads in the available themes.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Do you see it listed in broken themes at the bottom of the Themes page?

What happens when you drag and drop the project files as a custom theme?

Hey Zac,

I took your advice to mean zip the files and upload/install them that way. Then if that's the case, how do I add the screenshot.png file? When I add it to the regular folder (not zipped) and refresh, it doesn't update.

I think once I've got past this it'll be all good! So any help would be great!

Thanks

Thanks for both of your replies.

I have:

footer.php front-page.php header.php home.php index.php page.php single-work.php single.php style.css work.php

All in wp-content/themes/wpportfolio

I'm not seeing any "Broken Themes" on the theme page, and am not sure what you mean by drag and drop the project files as a custom theme. Do you mean zip them, and then install them like that?

Please elaborate a little! thanks for both of yours' help

Matt Campbell
Matt Campbell
9,767 Points

Can you copy and paste your comments at the top of your CSS please?

/* Theme Name: Portfolio for Allison Grayce Theme URI: http://wptreehouse.com/portfolio-project/ Description: A custom WordPress portoflio site for Allison Grayce built for the Treehouse tutorial series, "How to Build a WordPress Theme." Author: Zac Gordon Author URI: http://blog.teamtreehouse.com/author/zacgordon Version: 1.0 Tags: clean, light, responsive, two-column, custom-post-types, custom-fields, portfolio

License: GNU General Public License v2.0 License URI: http://www.gnu.org/licenses/gpl-2.0.html

This theme goes along with the How to Build a WordPress Theme tutorial series from teamtreehoulse.com */

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

I meant what happens when you copy and paste the download project files as a theme. Does that show up? I mean just upload the wpportfolio folder from the downloads and see if it shows up as a working theme.