嵌套短代码不起作用(第二级嵌套)


Nested shortcodes not working (2nd level nesting)

[row]
[column size="eight"]
    [row]<h5>HELLO<strong>WORLD</strong></h5>[/row]
    [row]<h5>CATEGORIES: <strong>WEB / CREATIONS / INTERACTIVE DESIGN</strong></h5>[/row]
[/column]
[column size="four"]Insert your content here[/column]
[/row]

这是我使用的简码。但出于某种原因,[行]...[/row] 简码似乎不起作用。这是简码功能:

function su_column_shortcode( $atts, $content = null ) {
    extract( shortcode_atts( array(
            'size' => 'six'
            ), $atts ) );
    return '<div class="' . $size . ' columns">' . su_do_shortcode( $content, 'c' ) . '</div>';
}
function su_row_shortcode($atta = null, $content = null ) {
    return '<div class="row">'.su_do_shortcode( $content, 'r').'</div>';
}

你所描述的不是问题,而是事实。

WordPress短代码不能嵌套。如果您需要嵌套,则需要自己进行"嵌套",方法是在您自己的简码中的"内部"部分应用所有短代码。

请参阅简码 API 限制:嵌套简码法典