短代码中的短代码 - 字压
我创建了一个显示员工的短代码,HTML看起来像这样:
<ul class="employees">
<li><img src=""> <h5>name</h5> <p>description</p></li>
<li><img src=""> <h5>name</h5> <p>description</p></li>
..
</ul>
所以我创建了2个短代码:
[start_employee] - 其中含有<ul class="employee"> .. </ul>
[员工] - 包含有关员工的内容
它应该像这样工作:
[start_employee]
[employee img=".." name=".." description=".."]
[employee img=".." name=".." description=".."]
[/start_employee]
但是当我把它放在wordpress编辑器中时,html看起来像这样:
<ul class="employee">
[employee img=".." name=".." description=".."]
[employee img=".." name=".." description=".."]
</ul>
我想我知道为什么..因为start_employee的赋值包含:
return '<ul class="employee">'.$content.'</ul>';
我该怎么做才能将其作为短代码读取?
谢谢。