changed page.php endif to endwhile