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

Bruno Felicio
Bruno Felicio
6,925 Points

single-"name of page template".php

Hi, if I use just single.php as the detail page, it works fine, but if I try to use the single-work.php (being work.php the listing template page) it doesn't show up anything, opens a blank page... What am I doing wrong?

3 Answers

Bruno Felicio
Bruno Felicio
6,925 Points

I got it. My mistake. I thought the name after the "single-" should be the template page name (ex: enadopcion.php), but actually it has to have the post_type name, which in my case was "adopcion".

Thanks.

Matt Campbell
Matt Campbell
9,767 Points

I had this issue recently and what I found was that there needed to be an archive-"whatever" as well as a single-"whatever". Codex says a little different but...maybe it's something new since WP3.7

Bruno Felicio
Bruno Felicio
6,925 Points

tried it and still nothing...