Echo Category name as Title on Category Archives

Hey

I’m wondering if instead of saying “Category Archives” on each archive page it could echo the category name instead?

Here’s an example: Instead of saying “Category Archives” on this page could it just say “Careers” as it’s title?

I was thinking it’s in this section of the _landmark-header.php but my php is a little rusty.

<?php elseif ( 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 posts that have been categorized as ", ‘x’ ) . ‘“’ . single_cat_title( ‘’, false ) . ‘”’;

?>

<?php echo $title ?>

<?php echo $subtitle ?>

Thanks.

Hi Heather,

Thanks for writing in! Simply edit your Categories and you can set an Archive Title so that it will replace the generic title “category archive”.

Hope that helps.
Thanks!

Great thanks.

You’re welcome!

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