get_the_category vs wp_get_post_categories

There are two functions that apparently serve the same purpose of retrieving a list of categories from a post:

  • get_the_category()
  • wp_get_post_categories()

What are the difference between those two and when should I prefer each? Are there any caveats I should be aware?

Read more here: get_the_category vs wp_get_post_categories

Leave a Reply

Your email address will not be published. Required fields are marked *