Custom Field sample usage Name: Product-Pdf-link Value: url
<?php if( have_posts() ): ?>
<?php while( have_posts() ): the_post(); ?>
<div class="single-product-item col-md-12 no-padding-left-right">
<div class="col-md-6">
<div class="single-product-img"><?php the_post_thumbnail(); ?></div>
<?php if ( get_post_meta($post->ID, 'Product-Pdf-link', true) ) { ?>
<div class="btn-wrap col-md-12 text-center" style="padding-top: 20px;">
<a href="<?php echo get_post_meta($post->ID, "Product-Pdf-link", $single = true); ?>" class="green-btn2" download>DOWNLOAD PDF</a>
</div>
<?php } ?>
</div>
<div class="col-md-6">
<div class="single-product-desc">
<div class="title-green-wrap">
<h4 class="green text-center"><?php the_title(); ?></h4>
<div class="content-single"><?php the_content(); ?></div>
</div>
</div>
</div>
</div>
<?php endwhile; ?>
<div class="navigation">
<span class="newer"><?php previous_posts_link(__('« Newer','example')) ?></span> <span class="older"><?php next_posts_link(__('Older »','example')) ?></span>
</div><!-- /.navigation -->
<?php else: ?>
<div id="post-404" class="noposts">
<p><?php _e('None found.','example'); ?></p>
</div><!-- /#post-404 -->
<?php endif; wp_reset_query(); ?>