Home Forums Support 404 Page

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1106331
    Charles

    How best to edit what is displayed on the 404 page? Thanks.

    #1106343
    Leo
    Staff
    Customer Support

    Hi there,

    What are you hoping to change?

    Here are a couple of filters for the default text:
    https://docs.generatepress.com/article/generate_404_text/
    https://docs.generatepress.com/article/generate_404_title/

    Let me know πŸ™‚

    #1106673
    Charles

    Maybe I want to use redirects instead?

    #1106679
    Charles

    I’m having trouble finding the source of my 404 errors. which of my pages is the bad link on?

    #1106926
    Leo
    Staff
    Customer Support

    Maybe something like this would help?
    https://generatepress.com/forums/topic/all-404-page-redirect-to-homepage/#post-667262

    This isn’t related to the theme itself.

    #1924842
    Roger

    @Leo

    Where do I put these filters? I don’t see where in GeneratePress I can add them?

    add_filter( 'generate_404_title','generate_custom_404_title' );
    function generate_custom_404_title()
    {
          return 'Custom 404 title';
    }
    
    add_filter( 'generate_404_text','generate_custom_404_text' );
    function generate_custom_404_text()
    {
          return 'Custom 404 text';
    }

    Where do I use the above code?

    Thank you,
    Roger

    #1924858
    Leo
    Staff
    Customer Support

    Hey Roger,

    Try one of these methods:
    https://docs.generatepress.com/article/adding-php/

    Code Snippets plugin would be my recommendation if you aren’t using a child theme already.

    #1925396
    Roger

    Thank you! πŸ™‚

    #1925552
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

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