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 How to Make a Website with WordPress Customizing WordPress Themes How to Make Child Themes

Alp Akal
Alp Akal
1,074 Points

Can't get the child theme to display

Hi,

I'm trying to make a child theme of twenty fourteen theme, here is my style.css file:

/*
Theme Name: Twenty Fourteen Child
Theme URI: http://www.alpakal.com 
Author: Alp Akal
Author URI: http://www.alpakal.com 
Description: Child theme for Twenty Fourteen Theme
Template: twentyfourteen
Version: 1.0
*/

@import "../twentyfourteen/style.css";

I'm guessing it has to do something with encoding of the editor I'm using synwrite with UTF-8 and UNIX ending. Can someone help me with this, thanks!

Austin Whipple
Austin Whipple
29,725 Points

Reformatted your code block. Be sure to check out the handy Markdown Cheatsheet linked below the text editor for help with formatting you questions, answers, and comments.

3 Answers

Alp Akal
Alp Akal
1,074 Points

I'd like to thank you all for helping. I have solved the problem and going to write it here for anyone facing a similar problem:

As Austin commented, there was not an encoding problem with the editor. Rather, we had a Digital Ocean server and had setup vsftpd with a group of users for ftp operations. These users were also a member of the www-data group, which Wordpress uses for accessing its files, but the default setting of vsftpd prevented newly created files on the server from having group read/write permissions.

That led to wordpress "not seeing" the Child Theme. This was quite difficult to pin down so I had to write this one, for anyone having this strange problem :)

Austin Whipple
Austin Whipple
29,725 Points

Luckily, I doubt your text editor is the culprit here. What about the child theme isn't displaying? If you haven't added any additional CSS or functions to a functions.php file, or added additional templates, the activated child theme will look identical to its parent.

The method you used to import the CSS should still work. However, it is no longer best practice as it can slow down the loading of the parent theme's CSS file. Give this Codex article a look and see if it helps out.

Alp Akal
Alp Akal
1,074 Points

Thanks for your reply, actually the problem is that the child theme isn't listed under appearance > themes. I inserted the reformatted code to the CSS file, but to no avail. I'll check the Codex article you mentioned and see if I can find something out. Thanks,

Dale Severude
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,349 Points

Have you created a folder for your child theme under wp-content/themes which contains your style.css? If so, then are there any errors at the bottom of Appearance > Themes? If there is a broken child theme under wp-content/themes, then you should see an error at the bottom of Appearance > Themes to help you understand what the issue is.

Here is another article to help create child themes. https://www.smashingmagazine.com/2016/01/create-customize-wordpress-child-theme/