WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Displaying category desription

[Resolved] Displaying category desription

  • I would like to display the category description at the top of the category page. Any ideas how to do this..

    the title is displayed using

    <?php echo single_cat_title(); ?> so i tried

    <?php echo single_cat_description(); ?>, but it doesn’t work..

    thanks in advance!

    James

Viewing 5 replies - 1 through 5 (of 5 total)
  • From memory, since the codex is throwing a wobbly…

    try <?php wp_title(''); ?>

    wp_title() will just output the category title. Try this:

    <?php
    global $wp_query;
    $category = $wp_query->get_queried_object();
    echo $category->category_description;
    ?>

    A little geeky, but should output what you’re looking for.

    I get a D- for reading comprehension and a reminder not to rely on my memory.

    Thanks, Kafkaesqui. 🙂

    Yes, thank you. That worked great. A little geeky doesn’t bother me… 😉

    <?php
    global $wp_query;
    $category = $wp_query->get_queried_object();
    echo $category->category_description;
    ?>

    Couldn’t get that to show me the description. Hmmm. Is there something I’m missing? Well, obviously. I really just want to put the cooresponding catergory description with the post on full posts. Is this possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Displaying category desription’ is closed to new replies.