• Resolved maddex

    (@maddex)


    Hi,

    I am building a product catalogue with downloadable products.

    If the file the user is trying to download doesn’t exist (maybe deleted permanently by mistake) the user is redirected to an ugly page with only this text on it: “File not found. Go to shop”.

    Is there a way to customize this page (and other similar pages for not found products, categories and so on) to make it have the same look and feel as the theme?

    Which file(s) do I have copy and add to my Child Theme?

    Thank you!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @maddex

    Thanks for reaching out!

    I understand that you want to customize WordPress’ Error 404 page.

    I did some research and found these articles could be a good starting point:

    How To Customize WordPress Error 404 Page
    Creating an Error 404 Page
    How to Edit a 404 Page in WordPress (Customization Guide) | WP Buffs

    Hope this helps!

    Thread Starter maddex

    (@maddex)

    I am using the Divi theme and already made a 404 page in their Theme Builder. But the page “File not found” is shown anyway, so maybe it’s better to make a regular WP 404 page. I will try the solutions in your links.

    Thanks!

    Hi @maddex

    I totally understand that. Please check the links above as I believe these also provide a tutorial on how to use your customized 404 page.

    Thanks!

    Thread Starter maddex

    (@maddex)

    Hi,

    Now I have tried the links above and the 404-page is working for regular pages, so no problem there.

    But the problem is that WooCommerce doesn’t find the 404-page. How make WooCommerce redirect to the 404-page instead of to the “File not found”-page?

    Is it possible to add some code to the htaccess-file that will force the WooCommerce product page to load the 404-page?

    Thanks!

    Thread Starter maddex

    (@maddex)

    Hi again,

    I managed to locate the not so user-friendly file in WooCommerce, which is this ugly looking page I want to avoid.

    It’s the file “class-wc-download-handler.php” in the folder “includes”.

    When the file the user wants to download is not found, this page comes up.

    Is there a way to avoid this page and redirect the user to the customized 404-page?

    Else, how do you customize this “class-wc-download-handler.php”-page?

    Thank you!

    Plugin Contributor Barry

    (@barryhughes-1)

    Hi @maddex,

    Unfortunately, there is not currently an easy way to override that message (in an update-safe manner).

    However, we’d be receptive to a feature request to introduce a regular overrideable template here—or something else along those lines—if you care to post one:

    https://woocommerce.com/feature-requests/woocommerce/

    Thanks!

    Thread Starter maddex

    (@maddex)

    Hi Barry,

    Thanks for your answer!

    I am willing to do what it takes because this page breaks the whole site and it’s totally user-unfriendly. It would be great if you could point me in the right direction on how to make an override in an update-safe manner.

    Thank you, have a nice day!

    Hi there @maddex ??

    I am willing to do what it takes because this page breaks the whole site and it’s totally user-unfriendly. It would be great if you could point me in the right direction on how to make an override in an update-safe manner.

    Kindly keep in mind we are not developers and only offer support for existing functionality.

    Please see our Support Policy: https://www.woocommerce.com/support-policy/

    For assistance with customization or development with your site, we recommend that you seek help from:

    * A local web developer
    * Codeable.io
    * WooExperts
    * Stackexchange

    If you are comfortable coding yourself and have questions, I would also recommend that you consider:

    * WooCommerce developer Portal
    * WooCommerce Slack Community
    * Advanced WooCommerce Facebook group

    I hope that helps you to figure it out.

    Feel free to get back to us if you have further questions.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How customize File not found-page’ is closed to new replies.