Get Category in Wordpress Post

Posted by Adam Beaumont on Stack Overflow See other posts from Stack Overflow or by Adam Beaumont
Published on 2012-11-29T03:07:44Z Indexed on 2012/11/29 11:05 UTC
Read the original article Hit count: 218

Filed under:
|

OK I have a standard post here:

http://www.ticketyoda.co.uk/concerts/rihanna-tickets/rihanna-tickets-manchester-2013-06-12-united-kingdom/970

I am trying to make each post unique and contain the category information for both the city (Manchester) and the Artist (Rihanna).

At the moment the box underneath the venue contains the information taken from the category (see breadcrumb). So I have 1 out of 2. What I need now is for an extra box below to show the category information for the Artist.

I use : <?php $category = get_the_category(); echo $category[0]->category_description; ?>

to get the first category.

You can see the rihanna description under the posts here:

http://www.ticketyoda.co.uk/concerts/rihanna-tickets/

Any help appreciated.

© Stack Overflow or respective owner

Related posts about php

Related posts about Wordpress