I figured out how to display the category title on my category pages by using the info in this post: https://theme.co/apex/forum/t/how-do-i-display-the-title-on-blog-post-and-category-pages/40568/2
However, none of the other posts I found will also show the category description. Can you tell me what to add to the code to also display the category description? This is one of my category pages https://update.breakup.expert/blog/category/breakup-advice/
This is what I posted in my child theme’s functions.php:
// Add post Category Titles
// =============================================================================
function add_category_titles(){ ?>
<?php if ( is_category() || x_is_portfolio_category() ) : ?>
<?php
$meta = x_get_taxonomy_meta();
$subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( 'REALISTIC ADVICE FOR ', __x__ ) . '<strong>' . single_cat_title( '', false ) . '</strong>';
?>
<header class="x-header-landmark x-container max width">
<h3 class="h-landmark" style="font-family:Montserrat;font-weight:200px;letter-spacing:.03EM;line-height:100%"><span><?php echo $subtitle ?></span></h3>
</header>
<?php endif;
}
add_action('x_after_view_global__slider-below', 'add_category_titles');
// =============================================================================