Welcome to the Treehouse Community
Looking to learn something new?
Displaying Custom Posts and Fields in a Template
This is in reference to How to Build a WordPress Theme. I have problems with the chapter “Displaying Custom Posts and Fields in a Template.” The problem starts when I write the WP_Query and integrate the ($the_query) to the loop. The Work menu doesn’t show the titles of each of work post on the page. And the <hr> disappear at all. About, Blog and Contact menu works so far. I have tried to solve the problem from different ways but I failed. In fact, I did a carefully reviewed from the start tree times but I stopped there. Any suggestion how to solve it?
Tawny Bartlett24,674 Points
Hi there. So just to understand where you are in the project, you've got a Page called Work which is displaying in the menu, but the page itself isn't showing your custom Work posts?
Have you 1 - Copied and pasted your page.php contents into work.php
2 - Created your work.php custom template and given it a Template Name
3 - Set the Work page to use this on the backend under Attributes > Template dropdown?
Otherwise are there any errors?
Thanks for your input. It's already resolved.