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

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...