[Resolved] Change the text 404 error

Home Forums Support [Resolved] Change the text 404 error

Home Forums Support Change the text 404 error

  • This topic has 30 replies, 8 voices, and was last updated 6 years ago by Tom.
Viewing 15 posts - 16 through 30 (of 31 total)
  • Author
    Posts
  • #319811
    Helen

    Thanks Tom,
    I’ve used the Code Snippets plugin and it works fine.
    All the best,
    Helen

    #320068
    Leo
    Staff
    Customer Support

    Glad we could help!

    #384241
    Thierry

    Hello,

    It’s possible to redirect a 404 page to index or other page ?

    #384269
    Leo
    Staff
    Customer Support
    #384367
    Thierry

    thank you, with htaccess or snippet it’s not possible ?

    #384397
    Tom
    Lead Developer
    Lead Developer

    I’m sure it’s possible, but I don’t know the exact code. Might be worth asking over on stackoverflow ๐Ÿ™‚

    #392311
    Thierry

    but it’s ok with this plugin, thx

    #392962
    Tom
    Lead Developer
    Lead Developer

    No problem ๐Ÿ™‚

    #511933
    _blank

    And how to remove the search form from a 404 page?

    #512166
    Leo
    Staff
    Customer Support

    Can you open a new topic please?

    Thanks!

    #512177
    _blank
    #512182
    Leo
    Staff
    Customer Support

    Glad you did!

    #537136
    Natalie

    is there any chnace that the recent update may have stopped your code snippet from working. Maybe something to do with the translations?

    Originally my default generatepress 404 page had

    “It looks like nothing was found at this location. Maybe try searching?”

    I used the snippet above to change the text to my own and it was working fine, but after the recent update my changes aren’t working and now it says

    “Sorry, but nothing matched your search terms. Please try again with some different keywords.”

    which is different from what is in the 404.php file so now I’m really confused.

    I use Australian english

    Thanks

    #537203
    Tom
    Lead Developer
    Lead Developer

    Those filters haven’t changed.

    That’s a different message you’re saying, which doesn’t have a filter unfortunately.

    Instead, you’d need to copy this file and add it to your child theme, then make the changes: https://github.com/tomusborne/generatepress/blob/2.0.2/no-results.php

    Alternatively, you can use this plugin: https://en-ca.wordpress.org/plugins/say-what/

    #537548
    Natalie

    oh my goodness – I’m so sorry – I must have been working too late.

    I was getting confused between the ‘page not found’ and ‘search term not found’ messages

    The ‘page not found’ text replacement is still working fine using this code snippet.

    The ‘search term not found’, as you say, needs to be ‘translated’ as a string which I have now done.

Viewing 15 posts - 16 through 30 (of 31 total)
  • You must be logged in to reply to this topic.