WordPress display page information rather than post

I figured out a solution. It works, not entirely sure if it’s best practice but I queried the posts first and it seems to show up.

Here’s my code;

<?php query_posts('showposts=2'); if (have_posts()) : while (have_posts()) : the_post(); ?>

I then closed the if statement with;

<?php endif; wp_reset_query(); ?>