• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

WP SITES

2785

Original Genesis & WooCommerce Tutorials & 6000+ Guaranteed Code

Snippets

  • Try Premium
  • Log in

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.

Click here to access free tutorials

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

  • Show Number Of Posts Before Archive Page Title

Taxonomy Terms

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Code written by Brad Dalton specialist for Genesis, WooCommerce & WordPress theme customization. Read More…

Advertise · WPEngine · Genesis · Log in

  • Access Problems
  • Account Details
  • Consulting
  • Tags