Update search for errors
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 16 Nov 2015 16:34:34 +0000 (11:34 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 16 Nov 2015 16:34:34 +0000 (11:34 -0500)
search.php
style.css

index aa2d4bb..329f7d9 100644 (file)
                     'order' => 'ASC'
                     );
                   $categories = get_categories($args);
-                    foreach($categories as $category) { 
-                      echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  } 
+                    foreach($categories as $category) {
+                      echo '<li><a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </li> ';  }
                     ?>
                 </ul>
             </div>
             <?php } ?> <!-- end empty query check -->
         </div>
-        <?php $query->set('post_type', 'post');
+        <?php if (isset($query)) {$query->set('post_type', 'post'); }
             }
         } ?>
     </div>
-    <?php get_footer(); ?>
\ No newline at end of file
+    <?php get_footer(); ?>
index cfccdb7..e0f5434 100644 (file)
--- a/style.css
+++ b/style.css
@@ -3,5 +3,5 @@ Theme Name: EmmetCountyGovernment
 Author: Gaslight Media
 Author URI: http://www.gaslightmedia.com
 Description: A theme for EmmetCountyGovernment
-Version: 1.0.0
+Version: 1.0.1
 */