Reply To: custom page titles for categories

Home Forums Support custom page titles for categories Reply To: custom page titles for categories

Home Forums Support custom page titles for categories Reply To: custom page titles for categories

#190895
Tom
Lead Developer
Lead Developer

Hmm, this is a tough one..

You would have to do something like this I think:

add_action( 'after_setup_theme','generate_taxonomy_title' );
function generate_taxonomy_title()
{
    if ( is_tax( 'tax-slug' ) ) {
        remove_action( 'generate_archive_title','generate_archive_title' );
        add_action( 'generate_archive_title','generate_custom_taxonomy_archive_title' );
    }
}

function generate_custom_taxonomy_archive_title()
{
?>
    <header class="page-header<?php if ( is_author() ) echo ' clearfix';?>">
        <?php do_action( 'generate_before_archive_title' ); ?>
        <h1 class="page-title">
            Your title
        </h1>
        <?php do_action( 'generate_after_archive_description' ); ?>
    </header>
<?php
}

Something along those lines..

https://codex.wordpress.org/Function_Reference/is_tax