• I am very new to web development. However, I have successfully implemented WordPress into a theme of my own. One of the only things that is left is to create a 404 page.

    WordPress is installed into my root directory…

    Through my hosting service, I have directed my 404 page to
    /wp-content/themes/mytheme/404.php … (this could be the issue?)

    So I go to a non-existent page in my website and this pops up
    ” Fatal error: Call to undefined function get_header() in D:\..\..\html\wp-content\themes\mytheme\404.php on line 6 “

    So my questions are:
    1) where am I supposed to direct the 404 page to through my hosting company?
    2) where do I place 404.php so that it correctly accesses header.php?

    Thank you for your help!

Viewing 2 replies - 1 through 2 (of 2 total)
  • If you’ve installed correctly and your htaccess file is working correctly, you shouldn’t need to do the redirect through your host at all…

    WordPress will take care of it! You can’t link directly to a theme file anyway.

    Thread Starter mismatchedpear

    (@mismatchedpear)

    You say I can’t link directly to a theme file, which is understandable. So in that case, which file do I link to direct users to 404.php?

    And my hoster is GoDaddy… I don’t have a .htaccess, but I believe GoDaddy handles all of that on their server. (I got an input box from “Manage 404 Page” asking me which URL to direct to.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issues with creating 404 page’ is closed to new replies.