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

Luke Lee
Luke Lee
7,577 Points

Single-work.php vs content-testimonial.php

Looks like both of are used for embed posts onto another page. So what's the difference? When should I use content-, and when should I use single- ?

Thanks

1 Answer

Matt Campbell
Matt Campbell
9,767 Points

Content is just a custom template that's created for a specific purpose, a unique page template perhaps. Imagine having a contact form page styled different from all your other pages so you'd make a contact.php template and a page.php template.

Single is just for a single post. Again, there's a differing version of this template type for different purposes.

https://codex.wordpress.org/images/1/18/Template_Hierarchy.png