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

WP SITES

2671

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Tutorial Requests
  • Contact
  • Videos
  • Tags
  • Log in

Premium Member? - Request custom code

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

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Brad Dalton Specializes In Genesis child theme customization & code modification. Read More…

Learn PHP Code

template_include

get_body_class

if else

array

class_exists

foreach

sprintf

add_action

printf

variable

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems