[Resolved] How to changes title on Blog pages ?

Home Forums Support [Resolved] How to changes title on Blog pages ?

Home Forums Support How to changes title on Blog pages ?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1675623
    Fajri

    How to changes title on Blog pages ?
    url : https://fajrialhadi.com/blog/
    Pict : https://prnt.sc/108pc7k

    #1675831
    David
    Staff
    Customer Support

    Hi there,

    go to Appearance > Elements and edit the Blog Page Header

    #1687246
    William

    Hi, I’m using an ELEMENT > PAGE HERO > with a HEADLINE and a DYNAMIC page title for the whole site except the frontpage.

    Only issue is that we’ve named the posts’ page “News”. But with the dynamic page title it is still reading as “Blog”.

    How can I force that to read as “News”?

    I’m running GP Premium + GenerateBlocks Pro

    #1687315
    David
    Staff
    Customer Support

    The easiest way is to exclude the Blog from your current header element display rules.
    And then create a Header Element specifically for your Blog and use static HTML for the title eg.

    <h1>News</h1>

    #1687919
    William

    Thank you for the reply David! I think it would be a little cleaner to leave the PAGE HERO alone and just have a function that replaces ‘Blog’ with ‘News’ – is that possible?

    Odd that WP doesn’t natively allow you to rename ‘Blog’.

    Many thanks, Will

    #1688293
    David
    Staff
    Customer Support

    Its not WP – the {{post_title}} only displays the_title which the blog itself doesn’t include. So GP adds Blog by default as in the majority of cases that is the title.

    Snippet provided here to change that behaviour so it grabs the page ID title:

    https://generatepress.com/forums/topic/cant-seem-to-change-blog-title/#post-1611030

    #1688498
    William

    I put this code into functions.php, perhaps I did something wrong, but it’s not having the desired effect. The /news/ page still has a title of ‘Blog’.

    News is the Posts Page

    #1688581
    Ying
    Staff
    Customer Support

    Hi William,

    Could you open a new topic for your question and use the private info field to link your site in question?
    Thanks!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.