Code To Get Category Name from Post ID in WordPress?

Posted by


In some cases we need to find out the category name from the post ID. At that time you can execute this code:

$categories = get_the_category($postID);


Shane G.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.