Many people want to know about post category and know more information current category. Some time we need to use the first category of wordpress post. As we know we can define the multiple category to single article. So if we want retrive the wordpress category then we will get the result in simple php array format. Using that array we can easily extract the first category of post.
if we want first category than, we will get result in php array format. Using that array we can easily get first category name or id from wordpress post.
How to get first category name or id from wordpress post
In this post I will show how we can achieve that. Using following code we can get the first category ID.
In this article we given code for Fetch the wordpress post paragraph number wise. created One function for fetching the wordpress post as per p tag number.