0
[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]...[/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>';
}
4

1 に答える 1

0

あなたが説明することは質問ではなく、事実です。

Wordpress ショートコードはネストできません。ネストが必要な場合は、ショートコード内の「内側」部分にすべてのショートコードを適用して、自分で「ネスト」する必要あります

ショートコード API の制限を参照してください: ネストされたショートコードCodex

于 2012-07-16T01:17:30.343 に答える