How to get the current category name, inside the loop
-
Hello guys,
I would like (mainly for seo reasons) to use the category name, inside the loop, when viewing a spesific category page.
Lets say in example, we are looking at category “rock-music” page, and we see some existing posts there, titles, thumbs and readmore. Now, i would like to add after each and every title, a line like “Another rock-music post, added (date goes here) by (author goes here)”
Have done all that, the only problem is geting the actual category name to use inside the loopPS – I am using a conditional statement
elseif ( is_gategory() ) : // Print a second line here in case we are browsing a category page
The conditional statement and ALL are working fine, my only problem is pass that damn current category name in there….ANY help/ideas are most welcomed ??
- The topic ‘How to get the current category name, inside the loop’ is closed to new replies.