Using SMOF as a backend admin and trying to include a shortcode in the text field for inclusion in the footer.
I am generaing the shortcode as
// Add Shortcode
function copyright_shortcode() {
// Code
return '<?php echo date("Y") ?>';
}
add_shortcode( 'copyright', 'copyright_shortcode' );
and calling the data from the SMOF options panel as so
<?php global $data; echo do_shortcode($data['footer_text']); ?>
The footer is generating the text from the field however, it is putting the shortcode data in <!-- -->.
return '<?php echo date("Y") ?>';
? Do you want the shortcode to output some PHP code? What's the output ofecho $data['footer_text'];
?<!--?php echo date("Y") ?-->
return date("Y");