Display Posts with Specific Custom Fields

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $custom_field = get_post_custom_values(“name-of-custom-field”); ?>
<?php if (isset($custom_field[0])) { ?>
<h1>< a rel=”nofollow” href=”<?php the_permalink(); ?>”><?php the_title(); ?>< /a></h1>
<?php the_content(); ?>
<?php } else { ?>
<h2>< a rel=”nofollow” href=”<?php the_permalink(); ?>”><?php the_title(); ?>< /a></h2>
<?php the_excerpt(); ?>
<?php } ?>
<?php endwhile; endif; ?>


Specific Custom Fields