Site logo

[Resolved] Customizing 404 page

Home Forums Support [Resolved] Customizing 404 page

Home Forums Support Customizing 404 page

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1406204
    mkjj

    We would like to customize the 404 page. This is pretty easy by copying it to the child theme folder. I removed the sidebar and changed the page to a boxed layout. While this is pretty straightforward, some not so clean workarounds are needed. For example, the classes for the “primary” DIV are generated dynamically. So, I have to hardcode the classes.

    Can I customize the page using the out-of-the-box theme tools? As far as I understand, there is no customizer setting for the 404 page. So, I can’t set the layout options for this page, can I?

    Don’t get me wrong. I’m ok with that. Just would like to know if a better solution exists.

    Thanks.

    #1406399
    David
    Staff
    Customer Support

    Hi there,

    currently there is now way to directly edit the 404 template from within the theme.
    But we are working on something that will allow that and a lot more in the next free theme and plugin updates.

    However you can still use Elements for the 404. It has its own display rule:

    https://docs.generatepress.com/article/elements-overview/

    Oh and the new Block Element also applies:

    https://docs.generatepress.com/article/block-element-overview/

    #1406414
    mkjj

    Thanks for the lightning fast support. The element pretty much does the trick. Very neat and powerful feature. Nice work! Doing it this way, I don’t need a customized file in the child theme.

    #1406419
    David
    Staff
    Customer Support

    You’re welcome – glad to hear that worked for you

    #1452585
    Sladki dar d.o.o.

    How do you create/edit 404 page?

    #1452600
    Leo
    Staff
    Customer Support

    A plugin like this should work the best:
    https://wordpress.org/plugins/404page/

    #1452610
    Sladki dar d.o.o.

    Thanks… have installed the plugin and selected page to be displayed as 404 page. How do I add header image (page hero)? I already have some images for other pages, however if I add 404 custom page to the list of locations (display rules – in elements), I don’t see the image.

    #1452613
    Leo
    Staff
    Customer Support

    Can you open a new topic for your question?

    THanks!

    #1630296
    Anders Nielsen

    Any ETA on..

    “”But we are working on something that will allow that and a lot more in the next free theme and plugin updates.”””

    So you will be able to edit the 404 page?

    #1630511
    David
    Staff
    Customer Support

    Hi there,

    you can already using the Block Element (or Hook Element).
    See here for how to:

    https://generatepress.com/forums/topic/how-to-redirect-404-error-to-custom-page/#post-1542136

    #1630559
    Anders Nielsen

    Awesome, thanks @David

    #1630561
    mkjj

    Does this work in a child theme only? For test purposes I’v just tried it without a child theme, and it still does not show the content of the the new block element.

    #1630575
    David
    Staff
    Customer Support

    As long as your using GP theme 3.0 then that hook will work. It doesn’t require a child theme.

    #1630580
    mkjj

    Ah, sorry, I was running an outdated version of GP Premium. I’ve just updated, and now it is working fine.
    Thanks.

    #1630581
    mkjj

    Awesome feature, by the way!

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