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 trialChristine Ferguson
1,883 PointsWordPress 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
Treehouse Guest TeacherHi 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!
Steve Leichman
7,008 PointsI'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
13,100 PointsFrom 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
7,008 PointsLike 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
7,008 PointsThis 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.
Christine Ferguson
1,883 PointsI figured out the answer. It's WP_Query. I don't think that was totally explained so that a newbie like me would understand.
Kevin Pittman
472 PointsYup, this question confused me too.
Christine Ferguson
1,883 PointsOh, 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.
Steve Leichman
7,008 PointsThat also drove me nuts.
Ajay Maheshwari
Courses Plus Student 6,423 Pointsuse this "the-field()"
Max Weir
14,963 PointsSeems 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.
Christine Ferguson
1,883 PointsChristine Ferguson
1,883 PointsThanks for following up, Zac!
Zac Gordon
Treehouse Guest TeacherZac Gordon
Treehouse Guest TeacherYou're welcome! Sorry for mixup!