- This topic has 13 replies, 4 voices, and was last updated 1 year, 3 months ago by David.
-
AuthorPosts
-
April 17, 2022 at 10:47 pm #2191871Jodie
Hi there
I am using the GeneratePress child theme and want to know how I can create a 404 page.
Currently I am using Elementor’s 404 template but I am in the process of removing it from my site.I have searched topics here and also the support documentation but still unclear how a 404 page is created with Generate Press
As always I appreciate your help.
Cheers JodieApril 17, 2022 at 11:01 pm #2191873Fernando Customer SupportHi Jodie,
You can create a custom 404 page by creating a 404.php file in the folder of your child theme.
You may opt to copy and then modify the content of the 404.php file in GeneratePress theme as well: https://github.com/tomusborne/generatepress/blob/master/404.php
Hope this clarifies. Kindly let us know if further assistance is needed. ๐
April 17, 2022 at 11:11 pm #2191879JodieHi Fernando
Thanks so much for providing this information.
So the code that is in the link above, do I copy all that over? That is the 46 lines?April 17, 2022 at 11:34 pm #2191892Fernando Customer SupportYes, you may copy all of that, then add your modifications after. This would be easiest to make sure everything works.
You may also create something from scratch, if you prefer. It would be good to include the hooks found in the parent 404 page.
Hope this clarifies. ๐
April 17, 2022 at 11:50 pm #2191906JodieThanks Fernando
When you say hooks found in the parent 404 page, where would I find them?April 18, 2022 at 12:01 am #2191912Fernando Customer SupportItโs the one I linked: https://github.com/tomusborne/generatepress/blob/master/404.php
It also utilizes this through
generate_do_template_part
: https://github.com/tomusborne/generatepress/blob/master/content-404.phpHope this clarifies. ๐
April 18, 2022 at 12:14 am #2191925JodieThanks very much Fernando.
April 18, 2022 at 12:16 am #2191926Fernando Customer SupportYouโre welcome Jodie! Glad to be of assistance! Feel free to reach out anytime youโll need assistance with anything else. ๐
April 20, 2022 at 9:31 pm #2195468JodieHi Fernando
UPDATE : I think I just worked it out! I changed the colors in the button settings in Customize.
I’ve removed the Elementor template for 404 on my site and it has reverted back to the GeneratePress version for 404.
The Search button that is next to the Search field is not visual but when I hover over that space the mouse changes to a hand.
I wondered how I could get the search button to show up please?
April 20, 2022 at 10:38 pm #2195500Fernando Customer SupportYes, the color should be changeable in Appearance > Customize > Colors > Buttons > Background.
Glad you were able to figure it out! Feel free to reach out anytime youโll need assistance with anything else. ๐
April 20, 2022 at 10:40 pm #2195502JodieCheers Fernando ๐
April 20, 2022 at 10:48 pm #2195513Fernando Customer SupportCheers Jodie! ๐
January 3, 2023 at 8:22 am #2482335ArnaudDear Fermando –
the 404.php has been added to my child theme.
Then how can I modify the content of this template ?
I would like to be able to edit the metadata as well.
not sure how to proceed.thx
January 3, 2023 at 9:44 am #2482468DavidStaffCustomer SupportHi there,
can you raise a new topic, and give us a little more info on what metadata needs changing
-
AuthorPosts
- You must be logged in to reply to this topic.