WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Displaying category desription (6 posts)

  1. jwwceo
    Member
    Posted 7 years ago #

    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

  2. Chris_K
    Member
    Posted 7 years ago #

    From memory, since the codex is throwing a wobbly...

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

  3. Kafkaesqui

    Posted 7 years ago #

    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.

  4. Chris_K
    Member
    Posted 7 years ago #

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

    Thanks, Kafkaesqui. :-)

  5. jwwceo
    Member
    Posted 7 years ago #

    Yes, thank you. That worked great. A little geeky doesn't bother me... ;)

  6. drew3000
    Member
    Posted 7 years ago #

    <?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?

Topic Closed

This topic has been closed to new replies.

About this Topic