WordPress.org

Ready to get started?Download WordPress

Forums

show category description below post (2 posts)

  1. Raisis
    Member
    Posted 3 years ago #

    Hi,

    below my blog post (on single.php) I would like to display the description of it's category. I tried different things and uses google, but everybody provide this code:

    <?php echo category_description(); ?>

    But this code works just in the archive.

    I also tried this plugin:
    http://wordpress.org/extend/plugins/tuis-category-intro-for-post/

    But I like to automatically displays the description below my posts...

    Does anyone has an idea?

    Greetings, Raisis

  2. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    edit single.php and add some code like the following (adding html tags for formatting is left to you):

    <?php $cats = get_the_category($post->ID);
    foreach($cats as $cat) {
    echo  $cat->category_description;
     }
    ?>

    http://codex.wordpress.org/Function_Reference/get_the_category

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.