Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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