Getting category description
-
Okay, so i hope i dont get ignored like my last post here
I managed to fix the problem on my own, but now im having trouble getting the category name.
Im currently using this script to get the category description:$cat_name = get_the_category( get_the_ID ); $category_id = get_cat_ID( $cat_name ); echo category_description( $category_id );The problem is, it doesn’t get the category name… when i replace $cat_name with the category name, it works on my website. The thing is, i don’t want the same thing on every post i have, i want it to have different description for each category.
Just tell me what’s wrong with the script while getting the category name, or some other simpler way to do this.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Getting category description’ is closed to new replies.