ホームページ制作|札幌
北海道札幌市北区北6条西6丁目2-1朝日プラザ偕楽園506号室
営業時間 7:00-24:00 TEL/FAX 011-768-8116
代表:グレン チャールズ ロウ
ただいま19人がオンライン中:ゲスト11人, 7 検索ボート, メンバー1人

How to make your WordPress 404 page work in Internet Explorer 5, 6, 7, 8, & 9

WordPress 404 Error Pages in IE 5, 6, 7, 8, & 9

When you use WordPress and try and open a page that doesn’t exist in internet Explorer 5, 6, 7, 8, or 9, the 404 error page doesn’t display like in other browsers.

If you also have this problem just follow the simple instructions below, to get your 404 error page working.

Open your 404.php with a text editor or your usual program. It is usually in the template folder of the theme you are using, and just add these 2 lines of code, before everything else at the top of the opened file, then save it and upload the file.

<!--?php ob_start(); ?--> 
<!--?php header("HTTP/1.1 404 Not Found"); ?-->

Your 404 error page should be working perfectly now in IE5, IE6, IE7, IE8 and IE9.

Glen Charles Rowell

http://a4jp.com

 

Here is an example of the code I am using on one page:

<?php ob_start(); ?> 
<?php header("HTTP/1.1 404 Not Found"); ?>
<?php get_header(); ?>
<div id="content">
	<div class="post">
		<h2 class="title title_page"><?php _e('Error 404 - Not Found', 'zbench'); ?></h2>
		<div class="entry">
			<p><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'zbench'); ?></p>
			<h3><?php _e('Random Posts', 'zbench'); ?></h3>
			<ul>
				<?php
					$rand_posts = get_posts('numberposts=5&orderby=rand');
					foreach( $rand_posts as $post ) :
				?>
				<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
				<?php endforeach; ?>
			</ul>
			<h3><?php _e('Tag Cloud', 'zbench'); ?></h3>
			<?php wp_tag_cloud('smallest=9&largest=22&unit=pt&number=200&format=flat&orderby=name&order=ASC');?>
		</div><!--entry-->
	</div><!--post-->
</div><!--content-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>

Comments

    Modather says:

    Everyone would benefit from reading this post. Thanks for the info.

Leave a Reply

A4JP.COM DESIGN

Copyright © 2019