Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #452086

    Hey guys,

    I hope all is well. I have modified enfold’s archive.php file to echo the Category Title at the top of all my category pages. Can you let me know how I can add the category description to display under the Category Title? The code I have so far is below and I have included a link to one of the category pages in “Private Content”….Thanks for all your help!!

    <?php if( is_category() )
    {
    echo ‘<h1>’ . single_cat_title(”,false) . ‘</h1>’;
    }
    else
    { ?>
    <div class=”category-term-description”>
    <?php echo term_description(); ?>
    </div>
    <?php
    } ?>

    #452114

    Hey!

    Try using category_description:
    https://codex.wordpress.org/Function_Reference/category_description

    Best regards,
    Josue

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.