Can someone explain Function Reference/category description (2 posts)

  1. mckoziqi
    Posted 3 years ago #

    I'd like to reference my category descriptions on my category pages so they show up on the category page. I've looked at http://codex.wordpress.org/Function_Reference/category_description but I'm not familiar at all with php. I tried adding this code in the archive.php file but nothing happened <?php echo category_description( $category_id ); ?>

    Ideally I could get the category description to show up in a widget on a sidebar.

    Any help appreciated.

  2. JarretC
    Posted 3 years ago #

    Try it without the $category_id

    <?php echo category_description(); ?>

    This will automatically find the category that the post is in and display the description.

Topic Closed

This topic has been closed to new replies.

About this Topic