Filter Archive Title In Genesis

There’s currently no filter for modifying the default output for category / tag / taxonomy archive page titles in Genesis which uses get_term_meta to get the term name.

What you need to do is remove the original function and add back a modified version of the code like this all via the safety of your child themes functions file :

The above code works on all archive page types.

However, for custom post type archive titles, you can also use the following filter hook to modify the default archive title for any CPT because Genesis uses post_type_archive_title to get the title.

The above code also works in non Genesis themes.

Based on this question from a member of the Genesis community :

How can I customize the archive title page ( CPT, taxonomy, author, etc )

Genesis Core Commit Recommendation

Modifying the archive titles would be so much easier if Genesis included a filter named genesis_term_headline_output on line 47 of genesis/lib/structure/archive.php.

This is what i tested :

$headline = apply_filters( 'genesis_term_headline_output', $headline );

And then you could use a filter function in your child theme like the following without having to remove and add back the default function :

add_filter( 'genesis_term_headline_output', 'modify_archive_titles', 10, 1 );

function modify_archive_titles( $headline ) {

$custom = 'Hello World';

return $custom . ' ' . $headline;

}

Related Tutorials

Join 5000+ Followers

Get The Latest Free & Premium Tutorials Delivered The Second They’re Published.