I’ve created a simple text custom meta field for pages. I can successfully enter plain text which prints on the frontend of the site with no problem.
I want to add shortcodes also. If I add a shortcode to the field, the shortcode prints to the front end as plain text.
The code I’m using:
<?php $meta = get_post_meta($post->ID, 'intSlider', true); ?>
<div id="sliderWrap">
<div id="slider" class="floatLeft">
<? echo $meta; ?>
</div>
</div>
I’ve looked into using the below code but not having much luck:
<?php echo ( do_shortcode( get_post_meta( $post->ID , 'intSlider' , true ) ) ); ?>
Any help much appreciated
Thanks