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 WordPress Theme Development Adding a Blog to a WordPress Theme Adding a Blog to a WordPress Theme Quiz

The_____() 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

there 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
sharaz shahid
4,671 Points

the_category() is not correct

The answer is : "the_category()"

You need to type the_category The parenthesis is already included in the questions part typed answer.

August Oliver
August Oliver
5,933 Points

The answer is: