2016-04-15 58 views
0

我有一个嵌套的简码像下面WP嵌套简码渲染问题

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

当我试图让boc_section ARGS我没有正确地得到。其被HTML编码

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

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

回答

1

你需要说wordpress不能纹理短代码的内容。 no_texturize_shortcodes获取不需要纹理化的短代码列表。

add_filter('no_texturize_shortcodes', 'ignore_boc'); 

function ignore_boc($list) { 
    $list[] = 'boc'; 
    return $list; 
} 
+0

仍然无法正常工作.. –