You are missing an <?php endif; ?>
[...]
else:
echo 'Sorry, only registered users can view this information';
endif;
<?php endwhile; // end of the loop. ?>
[...]
You are missing an <?php endif; ?>
[...]
else:
echo 'Sorry, only registered users can view this information';
endif;
<?php endwhile; // end of the loop. ?>
[...]