Site logo

Archived topic

Replacing "Blog" at header with a new title

4 replies · Started by Bob on February 15, 2021

Viewing posts 1–5 of 5

Hello,

Thanks for all your help on this. I've had great success with GP over the past half year, but I am still sort of a newbie. I am using the "Peak Theme," and specifically the version that has "3 elements." (My understanding is that it was recently changed to reduce the elements.

My question is this:

I found a post where Tom instructed how to change the default "Blog" header (i.e. below)

But I have no idea where or how to add it.

#*****************

add_filter( 'generate_page_hero_post_title', function( $title ) {
if ( is_home() ) {
$title = 'Your custom title';
}

return $title;
} );

#*****************

Can you direct me to the right spot, or if there's an easier way?

Thank you!

Bob

Hi there,

this article explains how to add that PHP Code:

https://docs.generatepress.com/article/adding-php/

If you don't want to add code, then create a new Header Element solely for the Blog - and manually add your title. Then in the current Header Element Display Rules - Exclude the Blog.

Thank you David, I might try the later and then be back in touch if it doesn't work. Thank you! Bob

David: Good news: I added the new element and excluded the blog from the global header, as you suggest, and it worked. Thanks again! Bob

Glad to hear that!

This archived topic is closed to new replies.