- This topic has 30 replies, 8 voices, and was last updated 3 years, 6 months ago by Tom.
May 18, 2017 at 3:08 am #319811Helen
I’ve used the Code Snippets plugin and it works fine.
All the best,
HelenMay 18, 2017 at 8:56 am #320068LeoStaffCustomer SupportSeptember 12, 2017 at 3:15 pm #384241Thierry
It’s possible to redirect a 404 page to index or other page ?September 12, 2017 at 4:36 pm #384269LeoStaffCustomer Support
Maybe a plugin like this would help: https://en-ca.wordpress.org/plugins/all-404-redirect-to-homepage/September 12, 2017 at 10:03 pm #384367Thierry
thank you, with htaccess or snippet it’s not possible ?September 12, 2017 at 11:40 pm #384397TomLead DeveloperLead DeveloperSeptember 26, 2017 at 9:05 am #392311Thierry
but it’s ok with this plugin, thxSeptember 27, 2017 at 9:39 am #392962TomLead DeveloperLead DeveloperMarch 5, 2018 at 6:29 am #511933Piotr
And how to remove the search form from a 404 page?March 5, 2018 at 9:28 am #512166LeoStaffCustomer SupportMarch 5, 2018 at 9:32 am #512177Piotr
Ok, found solution here:
https://generatepress.com/forums/topic/remove-search-from-404-page/March 5, 2018 at 9:35 am #512182LeoStaffCustomer SupportMarch 31, 2018 at 8:04 am #537136Natalie
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
ThanksMarch 31, 2018 at 8:53 am #537203TomLead DeveloperLead 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/March 31, 2018 at 9:24 pm #537548Natalie
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.
- You must be logged in to reply to this topic.