【发布时间】:2014-12-18 16:45:53
【问题描述】:
我正在使用允许您通过短代码创建选项卡的插件。 我为表单创建了一个短代码,但是当我将此短代码放在生成选项卡的插件的短代码之间时,表单不在选项卡中。
简码形式:
<?php
function test()
{
?>
<h1>Datos de Usiario</h1>
<form id="" action="" method="" >
<fieldset >
<legend>User Data</legend>
<input type='hidden' name='id_wp' value="<?php echo $user_id ?>" value='1'/>
<label for='nombre' >First Name*: </label>
<input type='text' name='nombre' id='' maxlength="50" />
<label for='apellido' >Last Name*: </label>
<input type='text' name='apellido' id='' maxlength="50" />
<label for='email' >Email Address*:</label>
<input type='text' name='emaild' id='' maxlength="50" />
<label for='ciudad' >City*: </label>
<input type='text' name='ciudad' id='' maxlength="50" />
<input type='submit' name='Submit' value='Submit' />
</fieldset>
</form>
<?php
}
?>
和 shorcode
function _test_() {
return test();
}
add_shortcode('test', '_test_');
我在页面上放了这个
[fusion_tabs design="classic" layout="horizontal" justified="yes" backgroundcolor="" inactivecolor="" bordercolor="" class="" id=""]
[fusion_tab title="Datos Usuario" icon="fa-user"]
Hello!!
[/fusion_tab]
[fusion_tab title="Registrar Pedido" icon="fa-plus-circle"]
[test]
[/fusion_tab]
[fusion_tab title="Estatus Pedidos" icon="fa-question-circle"]
any!!
[/fusion_tab]
[/fusion_tabs]
这就是结果
【问题讨论】:
-
这真的是你的简码吗?
return rest();?rest()是什么? -
对不起,测试不休息
-
为什么不干脆去掉
test(),把html放到_test_()里面呢?如果没有,你需要有test()return所有的html... -
在此下的新帖子中回答