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 trialpeterglenn
6,475 PointsHow can you get your Custom Fields to display on the Custom Post we've designed?
Since completing the steps in Adding Custom Content to WP, I have been unable to get entered content to display properly on my Project post. The only piece of information from my entered content that displays is the Post Title.
Do I need to build a Custom Template to have Custom Content display?
Could my theme be interfering?
Thanks in advance for any support you can offer.
Peter
2 Answers
Nick Ocampo
15,661 PointsIf you post your code, I'll probably be able to help. Are you using the WP_Query loop? Look it up in the WordPress Codex if not. Make sure you are using the name of your custom fields like so:
the_field("name_of_your_field");
As opposed to the_content(); which you would use on a regular post/page.
peterglenn
6,475 PointsNick,
Thanks for your response. It was very helpful.
I found this video a helpful explanation as well: http://teamtreehouse.com/library/how-to-build-a-wordpress-theme/wordpress-theme-functions/displaying-custom-posts-and-fields-in-a-template-2
Peter