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:

the_category