WP嵌套短代码渲染问题

时间:2016-04-15 10:34:26

标签: wordpress

我有一个嵌套的短代码,如下面的

[boc] [boc_section title='Bieren Alcoholvrij' category='9'] [boc_section title='fusten' category='11'] [/boc]

当我尝试 boc_section 时,我没有正确使用。它是html编码的

'category' => string '’9′' (length=15) 'include' => string '' (length=0) 'title' => string '’Bieren' (length=13)

我怎么能得到确切的价值?

1 个答案:

答案 0 :(得分:1)

你需要说wordpress不能对短代码的内容进行纹理化。 no_texturize_shortcodes列出了不需要进行纹理化的短代码。

add_filter( 'no_texturize_shortcodes', 'ignore_boc' );

function ignore_boc( $list ) {
  $list[] = 'boc';
  return $list;
}
相关问题