single_cat_title example

is_year() || is_search() || is_paged() ) :
                    ?> <li> <?php if ( is_404() ) : /* If this is a 404 page */ ?> <?php elseif ( is_category() ) : /* If this is a category archive */ ?> <p> <?php                     printf(
                        /* translators: %s: Category name. */
                        __( 'You are currently browsing the archives for the %s category.' ),
                        single_cat_title( '', false )
                    );
                ?> </p> <?php elseif ( is_day() ) : /* If this is a daily archive */ ?> <p> <?php                     printf(
                        /* translators: 1: Site link, 2: Archive date. */
                        __( 'You are currently browsing the %1$s blog archives for the day %2$s.' ),
                        sprintf( '<a href="%1$s/">%2$s</a>', get_bloginfo( 'url' )get_bloginfo( 'name' ) ),
                        

function get_the_archive_title() {
    $title  = __( 'Archives' );
    $prefix = '';

    if ( is_category() ) {
        $title  = single_cat_title( '', false );
        $prefix = _x( 'Category:', 'category archive title prefix' );
    } elseif ( is_tag() ) {
        $title  = single_tag_title( '', false );
        $prefix = _x( 'Tag:', 'tag archive title prefix' );
    } elseif ( is_author() ) {
        $title  = get_the_author();
        $prefix = _x( 'Author:', 'author archive title prefix' );
    } elseif ( is_year() ) {
        $title  = get_the_date( _x( 'Y', 'yearly archives date format' ) );
        $prefix = _x( 'Year:', 'date archive title prefix' );
    } elseif ( is_month() ) {
        
Home | Imprint | This part of the site doesn't use cookies.