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 trialLandon Booth
23,395 PointsThe_____() function will echo out the categories for a post?
I have been stuck on this question for some time now. I re-watched all the videos, but am still oblivious to the function that would be used here. Many thanks to whoever can answer and explain this to me
5 Answers
Jacob Mishkin
23,118 Pointsthere are a couple of things to know about php and Wordpress. "get_" and "the_". If you write the_"function" it will echo the function on its own. If you write get_"function" it will just get that data. So in our case we want the categories. so we would write the_category(); and this will echo the categories associated with the data inside the php block.
I hope this helps.
sharaz shahid
4,671 Pointsthe_category() is not correct
roberto garaffa
7,449 PointsThe answer is : "the_category()"
Leanne Millar
9,555 PointsYou need to type the_category The parenthesis is already included in the questions part typed answer.
August Oliver
5,934 PointsThe answer is:
the_category