好的,我正在尝试做什么
var $name = phpInfo.contact_form_name;
var $shortcode ="<div><?php echo do_shortcode(" + $name + ");?></div>";
$('#sliding_contact_form_wrapper_box').append("<span class='shortcode_content'>" + $shortcode + "</span>");
结果
<div>
<!--?php echo do_shortcode([contact-form-7 id="140" title="Contact form 1_copy"]);?-->
</div>
我尝试在functions.php中使用
作为解决方法 remove_filter('the_content', 'wpautop');
add_filter( 'the_content', 'wpautop',99 );
remove_filter( 'the_excerpt', 'wpautop' );
add_filter( 'the_excerpt', 'wpautop',99 );
add_filter( 'the_content', 'shortcode_unautop',100 );
现在我很难过,不知道我错过了什么
请帮忙!