Permalink
Browse files

Added a 404 error page and edited the search results to inform the user

if there are no results.
  • Loading branch information...
1 parent c82fc26 commit 99d42366c401a5868a50ac7ba7ef11a930dcc05e @matthewbdaly committed Feb 28, 2012
Showing with 19 additions and 3 deletions.
  1. +11 −0 404.php
  2. +8 −3 search.php
View
11 404.php
@@ -0,0 +1,11 @@
+<?php get_header(); ?>
+<?php get_sidebar(); ?>
+ <div id="content">
+ <div class="post">
+ <h2>Error 404 - Not Found</h2>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+<?php get_footer(); ?>
View
@@ -1,14 +1,19 @@
<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id="content">
- <?php if (have_posts()) ?>
+ <?php if (have_posts()):?>
<?php while(have_posts()) : the_post(); ?>
<div class="searchResult">
- <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
+ <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
- <h6><?php the_time('l jS F, Y - g:ia') ?></h6>
+ <h6><?php the_time('l jS F, Y - g:ia') ?></h6>
</div>
<?php endwhile; ?>
+ <?php else: ?>
+ <div class="searchResult">
+ <h2>Sorry, we can't find "<?php the_search_query(); ?>"</h2>
+ </div>
+ <?php endif; ?>
</div>
</div>
</div>

0 comments on commit 99d4236

Please sign in to comment.