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 How to Build a WordPress Theme WordPress Theme Functions Displaying Custom Posts and Fields in a Template

Christophe Rudyj
seal-mask
.a{fill-rule:evenodd;}techdegree
Christophe Rudyj
Full Stack JavaScript Techdegree Student 13,011 Points

A note should be made

when explaing the the_feild function to be sure that the student knows it comes from a plugin rather than wordpress it self

From what I remember of these videos they do inform you. Something along the lines of "As we have used custom post types we would need to target that data using 'the_field' rather than the_content"

Christophe Rudyj
seal-mask
.a{fill-rule:evenodd;}techdegree
Christophe Rudyj
Full Stack JavaScript Techdegree Student 13,011 Points

yeah but the thing is Zack only mention much later that the function is not included in wordpress but a result of a plugin. The student might want to use the_field() but thats not a Codex function as usually you need to do

<?php $meta_var   = get_post_meta( $post->ID, 'meta', true );
echo $meta_var; ?>

to get said post meta personnaly I would emphasis the use of codex functions instead of plugins