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 trialJeremy Frimond
14,470 Pointscustom page posts keep routing to index.php instead of single-custom_page.php
I have a page called employees.php. I have created a single-employees.php page too.
When I click on a link on the employees.php i expect to go to the single-employees.php page however I keep getting routed to the index.php page. Any ideas how to get it to see the single-employees.php page?
Additionally, If click on "view post" in the wordpress admin area it also links me to the index.php page
Cheers
2 Answers
Kevin Korte
28,149 PointsI'm assuming that your employees list is coming from a custom post type called employees?
Jeremy Frimond
14,470 PointsKevin Korte I figured it out thanks. I had the single page file titled single-employees when the singular label in the custom post type sections in the admin area was employee (without the "s")
Kevin Korte
28,149 PointsAwesome. We've all been there before!
Jeremy Frimond
14,470 PointsJeremy Frimond
14,470 PointsKevin Korte yes it is