Ok so give this shortcode a try:
function custom_meta_link( $atts ) {
$atts = shortcode_atts(
array(
'text' => '',
'link' => '',
), $atts, 'custom_field_display'
);
$html = '';
$text = get_post_meta(get_the_id(), $atts['text'], true);
$link = get_post_meta(get_the_id(), $atts['link'], true);
if(!empty($text) && !empty($link) ){
$html = sprintf('<a href="%2$s">%1$s</a>', $text, $link );
}
return $html;
}
add_shortcode( 'db_meta_link', 'custom_meta_link' );
Now you can do:
[db_meta_link text="your_text_meta_key" link="your_link_meta_key"]