Show Woocommerce category title

I’m having a hard time how to get the category title to show up on my Woocommerce category pages. I’ve tried modifying taxonomy-product_cat.php and archive-product.php in my child theme’s woocommerce but the changes don’t show.

Please let me know how to get the category title to show up on my Woocommerce category pages.

Hello There,

Thanks for writing in! I have inspected your site and it turns out that your are using Icon Stack. Please be advised that Icon stack is unique. In this stack, there is no Category title. You can check it out here: http://demo.theme.co/shop-icon/product-category/jewelry/

If you want to add the category titles, you may need to create a custom code and insert it in your child theme’s functions.php. You can start of by using this code:

// Add Product Category Titles
// =============================================================================
function add_category_titles(){  ?>
  <?php if ( x_is_product_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');
// =============================================================================

As this is all custom development, 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.

Thank you for your understanding.

That didn’t quite work as it just returned “Category Archive” as the title.

To display the actual title of the category I used:
<h1 class="h-landmark"><span><?php single_cat_title(''); ?></span></h1>

Hello There,

We are just glad that you have figured it out a way to correct the said issue.
Thanks for letting us know!

Cheers.