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 Make a Website with WordPress Custom Post Types and Fields in WordPress Custom Post Types and Fields Quiz

WordPress Quiz: Custom Post Types

I can't seem to find the answer to this:

To display custom fields in the template code, we use the ____ function.

All I can come up with is the 'The_field' function, which I know is a special function that comes with the Advanced Custom Fields plugin but I can't figure out what other function Zac references that also displays custom field in the template code.

11 Answers

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

Hi Christine Ferguson and Steve Leichman - looks like that was a bug and it's all resolved now!!! You two were absolutely on the right track with the answer tho!

Thanks for following up, Zac!

Steve Leichman
Steve Leichman
7,008 Points

I'm also a newbie. However, Zac pretty much says word for word, "To display custom fields in the template code, we use the the_field function." Silly Treehouse.

David Wasson
David Wasson
13,100 Points

From the video transcript: "The_field is the function used to display any custom fields that we're working with."

I think it's a bug too.

First one I've run into so far on tree house :)

Steve Leichman
Steve Leichman
7,008 Points

Like I said, I reported it via the feedback for the quiz. I'm not sure what the deal is with that. Maybe the Zac Gordon has the answer?

Steve Leichman
Steve Leichman
7,008 Points

This HAS to be a glitch. I just took this quiz earlier and it was driving me nuts (because the other fill in the blank wasn't working for my answers either). It appears that "the_field" is the actual correct answer (if the video is correct), though when I tried "the_field", "The Field", or even just "field" nothing worked.

I submitted this via my quiz feedback and you should too if you ever get through it.

Just keep reloading the quiz and hope you get the version with 4 multiple choice answers and only one fill in the blank so you can move through it.

I figured out the answer. It's WP_Query. I don't think that was totally explained so that a newbie like me would understand.

Yup, this question confused me too.

Oh, and Steve the answer to the other fill in the blank question for this quiz is "see". I tried using "view" at first and it was rejected.

use this "the-field()"

Max Weir
Max Weir
14,963 Points

Seems to work now using: the_field

As a reference it should be written in this format and not The_field or the-field() for example.