• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 91
  • Last Modified:

Show description of child category


I´m trying to get from php the description of a "child category"
I´m using this code:

$category = get_the_category(); 
$last_category = end($category); 
echo $last_category->cat_name; 

Open in new window

I´ts working fine for the name of category

How can i get de description of this category ?
1 Solution
Mark BradyPrincipal Data EngineerCommented:
Post your code for the function get_the_category()
It sounds like that function only returns the name of the last category in the object that is passed into it.
If you need more information returned by that function it will need to be modified to include a description or whatever the description field name is.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now