I need to write a function that defines a variable with html markup, now within that html markup I need to include a php snippet that has to be passed through a hook then outputted to my browser. Within my span tags I need the php snippet to output correctly.
The php snippet is this
<?php gravity_form(1, true, true, false, '', true); ?>
My function is below notice how the php snippet is formatted, I need to find out how to properly format it.
function html_fxcntab_hidden_gform() {
$html_fxcntab_hidden_gform_div = "<span style= "display:none";> <?php gravity_form(1, true, true, false, '', true); ?> </span>";
echo $html_fxcntab_hidden_gform_div;
}
add_action('wp_footer', 'html_fxcntab_hidden_gform');
Thanks,
Michael Sablatura
1 comment