- This topic has 15 replies, 2 voices, and was last updated 4 years, 3 months ago by
Ying.
-
AuthorPosts
-
January 23, 2020 at 7:08 pm #1142130
Paul
Hi, Is it possible to have a custom 404 page with the template I’m using?
January 24, 2020 at 4:41 am #1142392David
StaffCustomer SupportJanuary 24, 2020 at 7:01 pm #1143177Paul
OK – Good to know, I’m on a plugin diet.
January 25, 2020 at 1:23 am #1143332David
StaffCustomer SupportOptions:
1. Use a child theme and make a copy of the 404.php template and recode….
2. Create a Header Element for your 404 and we can use some CSS to ‘hide’ the default content
3. Or the plugin.The plugin does do all the grunt work that you need to cover if you go with the (1) child theme route
January 25, 2020 at 7:54 am #1143786Paul
Let’s give option 2 a try.
January 25, 2020 at 8:10 am #1143792David
StaffCustomer SupportSo create a new Element, add whatever content backgrounds etc.
https://docs.generatepress.com/article/header-element-overview/
Then add this CSS to hide the standard 404 content:
.error404 #page { display: none; }January 26, 2020 at 7:22 am #1144743Paul
This seems like a good fit – is it possible for me to add a search box in the custom header? Pretty much looking to have the template layout withing the new custom header. Thanks.
January 26, 2020 at 9:55 am #1144863Leo
StaffCustomer SupportYou can create a hook element and use this to add a search form;
<?php get_search_form(); ?>January 27, 2020 at 11:04 am #1146027Paul
I was able to try that out, ideally I’d like the search box to be under the text that’s there https://www.trademarkinteriors.com/404 how would I accomplish that?
January 27, 2020 at 11:13 am #1146043David
StaffCustomer SupportTom provides a shortcode function here:
https://generatepress.com/forums/topic/search-field-in-404-page/#post-787184
Once that snippet is added to your site
https://docs.generatepress.com/article/adding-php/You can add the
[search_form]shortcode to the header elementJanuary 27, 2020 at 11:23 am #1146053Paul
BEAUTIFUL! Thanks!!
January 28, 2020 at 3:20 am #1146664David
StaffCustomer SupportYou’re welcome
January 4, 2022 at 11:31 am #2069164Ravi Dixit
Hey, David!
I’ve followed your instructions and created a block element and select the location as a 404 templates to have a custom 404-page body. I also tried this CSS you suggested:
.error404 #page { display: none; }But it is hiding the entire page content including the block I created.
How can I remove these items from the page: https://prnt.sc/260b1qe
January 4, 2022 at 11:51 am #2069186Ying
StaffCustomer SupportI’ve followed your instructions and created a block element
David was suggesting using a header element, not a block element. If you are using a block element, make sure you choose
page heroas the element type.January 4, 2022 at 11:53 am #2069189Ravi Dixit
Okay, I selected the page hero as the element type then how to hide those items from page?
-
AuthorPosts
- You must be logged in to reply to this topic.