'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(); ?>