Get post category within the loop…
-
For each posts, I would like to have a variable defined with the category it sits in.
For instance, post 1 is cat1, then $category would be 1;
Post 2 is cat2, then $category would be 2;
Post 3 is cat1, then $category would be 1;You get what I want? Thanks.
And I want to avoid creating another custom key for each post.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Get post category within the loop…’ is closed to new replies.