twofivethreetwo
Member
Posted 3 years ago #
I need to get the current category of a post and right now am using single_cat_title but the posts have multiple cats. How do I grab the cat that is used in the permalink? How does WP pick which cat to use in the permalink?
My permalinks are /%category%/%postname%/
You could have done so yourself, but a little playing with a test post reveals that the category in your "slug" is the category that comes first alphabetically!
zedesino
Member
Posted 3 years ago #
Hello twofivethreetwo,
does you find this working somehow
thanks
Looking for the same aswer. Couldn't find anything throught the documentation nor the forums.