WordPress.org

Ready to get started?Download WordPress

Forums

404 not showing when it should (1 post)

  1. Skinny_Latte
    Member
    Posted 4 years ago #

    My 404 page is not showing up when i type in malformed urls. All I get is a page with the header and footer.

    I'm using a customised theme but can anybody tell me which files I should have an else statement that pulls the 404 template?

    I have the else statement in my index file but I think I might've customised the theme to the point of breaking it :(

    Here is my index.php code:

    <?php get_header(); ?>
    
    <div id="pagee">
    
    	<div class="wrap">
    
    		<h2>Archive</h2>    	
    
        </div> <!-- pagee wrap -->
    
    </div><!-- pagee -->
    
    <div id="main">
    
    	<div class="wrap">        	
    
           <?php get_sidebar(); ?>  
    
        	 <div id="content">
    
              <?php if (have_posts()) : ?>     
    
            		<?php while (have_posts()) : the_post(); ?>    
    
    			<div class="post" id="post-<?php the_ID(); ?>">
    
            	<h3><span><?php the_time('F j, Y'); ?></span><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>                	
    
                <?php the_content('Read the rest of this entry &raquo;'); ?>           
    
            	<p><a href="<?php the_permalink() ?>" >Read more</a></p>
    
            	</div> <!-- post -->
    
            	 <?php endwhile; ?>     
    
            <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>  
    
            	 <?php endif; ?>
            			<?php else : ?>
    
    			<h3>Not Found</h3>
    
    			<p>Sorry, but you are looking for something that isn't here.</p>
    
    	<?php endif; ?>
            </div><!-- content -->
    
        </div><!-- main wrap -->
    
    </div> <!-- main -->
    
    <?php get_footer(); ?>

    Can anybody help?

Topic Closed

This topic has been closed to new replies.

About this Topic