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 WordPress Theme Development Starting a WordPress Theme Setting Up A WordPress Theme Folder

shareyourpeace
shareyourpeace
3,244 Points

Styles.css requires comments, template info etc. Which lines of code need to be specific to our individual project ?

I am used to /comments/ as code that is ignored by executable scripts.

Can someone explain this difference with WP ?

From the wordpress project downloads for this video, we copy the /comments/ into our new style.css file.

On previous videos, I have noticed different Configurations to identify that this file is based upon a template.

Examples.

/* Theme name: twenty fourteen ... */

/* Template name: twenty fourteen child ... */

Do we use Theme name: Or Template name: ?

In real world individual development, Which of these lines of code need to be exact information -specific to my site ?

Thanks

3 Answers

Chris Hubbard
Chris Hubbard
2,253 Points

@shareyourpeace ,

You're always going to need a unique theme name, however you only use a template name when you're activating a child theme.

The template comment in a child theme references the parent theme.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

WordPress uses the comments for meta information. So it's not ever really displayed on the front end, but is used in custom page templates and the css file as you've noticed. Just a clever way of passing meta data.

shareyourpeace
shareyourpeace
3,244 Points

But in other programming languages, if you use /* / the code between the /. */ are ignored completely.

So in wp, this code Template Name: child template is acknowledged ?

I am posing another similar issue right now. Thanks