- This topic has 30 replies, 8 voices, and was last updated 7 years, 12 months ago by
Tom.
-
AuthorPosts
-
May 18, 2017 at 3:08 am #319811
Helen
Thanks Tom,
I’ve used the Code Snippets plugin and it works fine.
All the best,
HelenMay 18, 2017 at 8:56 am #320068Leo
StaffCustomer SupportGlad we could help!
September 12, 2017 at 3:15 pm #384241Thierry
Hello,
It’s possible to redirect a 404 page to index or other page ?
September 12, 2017 at 4:36 pm #384269Leo
StaffCustomer SupportMaybe 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 #384397Tom
Lead DeveloperLead DeveloperI’m sure it’s possible, but I don’t know the exact code. Might be worth asking over on stackoverflow 🙂
September 26, 2017 at 9:05 am #392311Thierry
but it’s ok with this plugin, thx
September 27, 2017 at 9:39 am #392962Tom
Lead DeveloperLead DeveloperNo problem 🙂
March 5, 2018 at 6:29 am #511933_blank
And how to remove the search form from a 404 page?
March 5, 2018 at 9:28 am #512166Leo
StaffCustomer SupportCan you open a new topic please?
Thanks!
March 5, 2018 at 9:32 am #512177_blank
Ok, found solution here:
https://generatepress.com/forums/topic/remove-search-from-404-page/March 5, 2018 at 9:35 am #512182Leo
StaffCustomer SupportGlad you did!
March 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
Thanks
March 31, 2018 at 8:53 am #537203Tom
Lead DeveloperLead DeveloperThose 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.
-
AuthorPosts
- You must be logged in to reply to this topic.