How do I display the Title on Blog Post and Category Pages?

Hey team,

I use the Icon stack and I’m looking to display the name of the category as a title on each Category Page. Is this possible?

CSS is preferred. If it requires a function, can you please explain to me or provide me with a link to learn how to find the function.php file in the Child Theme? I can’t find it for the life of me, so I avoid doing functions at all cost.

Category page example:
https://simpleayurveda.com/category/everydaywellness/

Hello @SimpleAyurveda,

Thanks for asking. :slight_smile:

By design Icon stack won’t show Category title. If you would like to display category title then it will require some custom development work which falls outside the scope of support we offer. However, I can definitely help you to get started.

First, I suggest you to please install and setup child theme. You can use following resources to download and setup child theme.

Download Child theme from following source: https://theme.co/apex/child-themes

Please take a look at following article to setup child theme:

Next, you can copy following code in child theme function.php file:

// Add post Category Titles
// =============================================================================
function add_category_titles(){  ?>
  <?php if ( is_category() || x_is_portfolio_category() ) : ?>

  <?php
  
  $meta     = x_get_taxonomy_meta();
  $title    = ( $meta['archive-title']    != '' ) ? $meta['archive-title']    : __( 'Category Archive', '__x__' );
  $subtitle = ( $meta['archive-subtitle'] != '' ) ? $meta['archive-subtitle'] : __( "Below you'll find a list of all items that have been categorized as ", '__x__' ) . '<strong>&ldquo;' . single_cat_title( '', false ) . '&rdquo;</strong>';

  ?>

  <header class="x-header-landmark x-container max width">
    <h1 class="h-landmark"><span><?php echo $title ?></span></h1>
    <p class="p-landmark-sub"><span><?php echo $subtitle ?></span></p>
  </header>

  <?php endif;
}
add_action('x_after_view_global__slider-below', 'add_category_titles');
// =============================================================================

Please note that it’s all custom development to show title in Icon stack, regretfully we won’t be able to assist further. Custom development is outside the scope of our support. We’re happy to provide advice and get you started in the right direction, but you would still be responsible for the implementation. And moreover, this solution may not work after several updates especially if the themes structure changed or overridden.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.