[Resolved] 404 Page title error

Home Forums Support [Resolved] 404 Page title error

Home Forums Support 404 Page title error

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1972502
    O’Reilly

    Hi,

    I was having an issue with my 404 page showing the title of my latest posts.

    So in order to resolve this issue I excluded my 404 page from the Block – Page Hero and that stops the title from showing.

    But now there is no space anymore between the logo of the site and the 404 error message.

    How do i insert a header or add some space to my 404 page so that there is space between my site logo and the title of the 404 page?

    #1972602
    David
    Staff
    Customer Support

    Hi there,

    you can create a Hero Element specifically for your 404 page, by setting the Display Rules Location to: 404 Template.

    #1974068
    O’Reilly

    Hi,

    I have done this, but it is not showing up on the 404 page.

    Also.. How do I edit the contents of the 404 page?

    I have created temp access for you an included this in the Private information so you can have a look.

    Thanks.

    #1974071
    Elvin
    Staff
    Customer Support

    Hi there,

    You can try creating a Block Element – Content Template and set the display rule location to your 404 page like this – https://share.getcloudapp.com/wbu8mGRG

    #1974079
    O’Reilly

    Ok, thanks that is working.

    Another question, how do I change the title of the page? So not the H1 title, but the meta title.

    It now shows Page Not Found – Same of the site and I would like to edit this.

    Thanks

    #1974085
    Elvin
    Staff
    Customer Support

    You’ll need a SEO Plugin like Yoast or a PHP snippet for that.

    Example:

    add_filter( 'document_title_parts', 'page_404_title_change', 15,1 );
    
    function page_404_title_change( $title ){
    	if ( is_404() ) {
            $title_parts_array['title'] = 'ADD 404 TITLE TEXT HERE';
        }
        return $title_parts_array;
    }

    Here’s how to add PHP snippets to the site – https://docs.generatepress.com/article/adding-php/

    #1974345
    O’Reilly

    Thanks,

    Got it all working.

    #1975308
    Elvin
    Staff
    Customer Support

    Nice one. No problem. 😀

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