skip to Main Content

Snippet: Alter Page Title Subheading

The following snippet can be used to modify the page header title subheading text. In this example you can see how you could remove the default subheading on the author archives or how you could add a custom subheading for a custom post type.

 * Modify the page title subheading.
 * @link
add_filter( 'totaltheme/page/header/subheading', function( $subheading ) {

    // Remove author subheading.
    if ( is_author() ) {
        return '';

    // Display a custom subheading for my_post_type posts.
    if ( is_singular( 'my_post_type' ) ) {
    	$subheading = 'My Post Type Subheading';

    return $subheading;
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend WPCode)
Back To Top