This is a simple but tricky question. I strucked in a problem where i am unable to understand how can i warp all of the html code so that it show on backend with PHP value.
<a href="<?php echo get_post_meta( $post->ID, 'fit_link', true );
?>" target="_blank">
<?php echo get_post_meta( $post->ID, 'fit_text', true ); ?>
</a>
The problem is when there is no Link and text value retrieved from DB it shows a empty anchor tag in source.
Just like this: <a href="" target="_blank"></a>
Can anyone please help me to understand that how can i make above code to output when there is value. otherwise it should not show any code in source.
<a href="" target="_blank"> </a>