• I have searched through many forum posts and cannot find a fix for my problem so have decided to ask here. I have a site which consists of static pages. If I leave permalinks on Default, and type in a non-existent URL, I get a generic NOT FOUND page, not my theme’s custom 404.php.

    If I change Permalinks to anything other than default, I get:

    https://www.mydomain.co.uk/wp-content/plugins/flexslider/js/jquery.flexslider-min.js?ver=1.5'></script>
    <script type='text/javascript' src='https://www.mydomain.co.uk/wp-content/plugins/contact-form-7/jquery.form.js?ver=2.52'></script>
    <script type='text/javascript' src='https://www.mydomain.co.uk/wp-content/plugins/contact-form-7/scripts.js?ver=3.0.1'></script>
    </div><!--.smallfootercont-->
    </div><!--.footercont-->
    </div><!--.footer-->
    
    </body>
    </html>

    I have tried disabling Plugins and it didn’t help. I have tried creating a page of posts and it didn’t help. My .htaccess file looks like this:

    # BEGIN WordPress
    # END WordPress

    Any suggestions?

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter wambamboo

    (@agatha1)

    The same thing is happening with archive.php and single.php

    Thread Starter wambamboo

    (@agatha1)

    I have read all I can in the Codex. Is there a way of telling static pages to use a 404.php file?
    I’m a bit of a PHP beginner to be honest.
    Thanks

    Thread Starter wambamboo

    (@agatha1)

    Maybe I should mention that I’m using Fasthosts. I know some people on various other blogs have mentioned that Fasthosts doesn’t work well with WordPress 404 pages but just wondering if anyone has a solution?
    Going to email Fasthosts too.

    Thread Starter wambamboo

    (@agatha1)

    I found this:

    “You can also do a redirect in your theme’s 404.php file (yes, it’s ugly…) to your static error page: <?php Header(“Location: https://mydomain.com/error/&#8221;); ?>”

    here

    and it worked. No idea why and it’s not ideal but at least it’s a solution.

    Thread Starter wambamboo

    (@agatha1)

    Hi

    No idea why, but after doing this, single.php and archive.php both redirect to the error page I created. Does anyone know why this would happen and how I can resolve it?

    Thanks

    Thread Starter wambamboo

    (@agatha1)

    If I write a direct path to single.php in the parent theme(Starkers) I get this:

    Fatal error: Call to undefined function get_header() in /home/fhlinux199/y/mydomain.co.uk/user/htdocs/wp-content/themes/Starkers/single.php on line 10

    And similar for 404.php and archive.php

    Which makes me think it’s definitely my mistake.

    Any suggestions would be appreciated.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘404 page not displaying’ is closed to new replies.