Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Atahualpa 3 Wordpress theme (http://forum.bytesforall.com/forumdisplay.php?f=2)
-   -   Custom 404 Page and IE 8 (http://forum.bytesforall.com/showthread.php?t=2787)

abroadinspain Aug 2, 2009 08:04 PM

Custom 404 Page and IE 8
 
I created a custom 404 page to be used with Atahualpa 3.2 by making a 404.php file and placing the following code inside:

Code:

<?php
global $options;
foreach ($options as $value) {
        if (get_option( $value['id'] ) === FALSE) {
                $$value['id'] = $value['std'];
        } else {
                $$value['id'] = get_option( $value['id'] );
        }
}
if ( is_page() ) { global $wp_query; $current_page_id = $wp_query->get_queried_object_id(); }
?>
<?php get_header(); ?>

<p align="left"><font size=5><b>OOPS!!!  It looks like that page got lost.</b></font></p>
<p align="left">I'm sorry to say that the page you were looking for could not be found.  You may wish to go back to my <a href="http://abroadinspain.com">home page</a> or you could try using the search box in the upper-right corner of this page.</p>

                       
<?php get_footer(); ?>

The custom 404 page works wonderfully in all browsers that I have tested it in, except in IE 8. In that browser, the custom 404 page loads sometimes but other times I get the standard IE "this page cannot be found" 404 page. The custom 404 file does appear to work in earlier versions of IE, just not IE 8.

I'm not really sure if this is a theme issue, a wordpress issue, or an IE issue, but does anyone know why this might be happening? I tried posting this question over at the wordpress forums and everybody seemed stumped.

The best way to re-create this issue is to visit a page that doesn't exist on my server using IE 8 as your browser. For example, you could try visiting the following non-existent page: http://abroadinspain.com/404-doesnt-work-on-ie

If anyone can shed some light on this problem, I'd be very grateful. Thanks in advance!

--Chris

sleenie Aug 6, 2009 02:28 PM

Hi,

I'm very interested in learning where this code would go. I need to create a custom 404 page as the site has been moved to WordPress just recently. I'm using the plug-in Redirection, but would still like to custmize the page as the plugin doesn't seem to work on all pages.

abroadinspain Aug 6, 2009 07:44 PM

Quote:

Originally Posted by sleenie (Post 12083)
Hi,

I'm very interested in learning where this code would go. I need to create a custom 404 page as the site has been moved to WordPress just recently. I'm using the plug-in Redirection, but would still like to custmize the page as the plugin doesn't seem to work on all pages.

I created a new file entitled "404.php" and placed that in my theme's directory. Like I said in the original post, it worked in every browser I tested it in except for in IE 8. In that browser, the custom page displays about 50% of the time. The other 50% of the time, I get the standard IE error page... I can't figure out why it's doing that.

Flynn Aug 8, 2009 07:16 PM

It shouldn't be different in IE8 due to the
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

in the header. Please try with the Default theme to see whether this is caused by Atahualpa

MikeCaine Sep 29, 2009 09:20 AM

Taking a slightly different approach, can I use

<!--#echo var="HTTP_HOST" --><!--#echo var="REQUEST_URI" -->

from my old 404.shtml file and use it in the "Content if NOT FOUND" section and if so, how do I do it?

I seem to get an error if I just paste in it as is

Mike


All times are GMT -6. The time now is 07:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.