How to set a custom title for Posts page in Genesis

Posted on
5/5 - (336 votes)

In my earlier post titled How to set a custom title for Posts page in WordPress, I showed how the_title filter can be used to change the Posts page title on the frontend.

While this method should work in any WordPress theme including Genesis, if you are looking for Genesis-specific way of achieving similar add the following in child theme’s functions.php:

remove_action( 'genesis_archive_title_descriptions', 'genesis_do_archive_headings_headline', 10, 3 );

add_action( 'genesis_archive_title_descriptions', 'custom_do_archive_headings_headline', 10, 3 );
/**
 * Add headline for archive headings to archive pages.
 *
 * @since 2.5.0
 *
 * @param string $heading    Optional. Archive heading, default is empty string.
 * @param string $intro_text Optional. Archive intro text, default is empty string.
 * @param string $context    Optional. Archive context, default is empty string.
 */
function custom_do_archive_headings_headline( $heading = '', $intro_text = '', $context = '' ) {
    if ( 'posts-page-description' === $context ) {
        $heading = 'Latest News'; // set your desired Posts page title here.
    }

    printf( '<h1 %s>%s</h1>', genesis_attr( 'archive-title' ), strip_tags( $heading ) );
}

Source: genesis/lib/structure/archive.php.