I am trying to publish custom fields created using the plugin "Advanced Custom fields". I am able to display them on posts and custom post types as raw output. But I want to wrap html around the output.
Ex: Field-1(field name is 'the_one'): I want to publish any content like Text or Date with the format I want.
<?php if( get_field('the_one') != '' ) : ?>
<span class=the_one field1"><a href="<?php echo get_field('the_one'); ?>"><?php _e( '<b data-icon="info" class="inner-content">Content</b>', $post_id ); ?></a></span>
Field-2 (field name is 'the_link'): I want the URLs for website urls be published converting to links
<?php if( get_field('the_link') != '' ) : ?>
<span class=the_link field2"><a href="<?php echo get_field('the_one'); ?>"><?php _e( '<b data-icon="web" class="inner-content">Special Category</b>', $post_id ); ?></a></span>
<?php endif; ?>
Could any one help me with this?
Thanks!
Update: I have no success creating custom fields by own. So tried to use ACF again. Here is the loop.php code- http://pastebin.com/7UE2izdg. Custom fields are in the lines 58 and 59.