內容簡介
顯示一個選定類別法中所有詞彙的清單區塊。
您可以透過在主題中放置範本檔案來更改顯示方式。
template-parts/blocks/terms-block/區塊名稱–區塊樣式.php
template-parts/blocks/terms-block/區塊名稱.php
get_terms的過濾器。
add_filter( 'terms_block_get_terms_arguments', 'my_filter', 10, 3 );
function my_filter( $args, $taxonomy, $attributes ) {
$args = array_merge( $args, array( 'orderby' => 'order' ) );
return $args;
}
外掛標籤
開發者團隊
原文外掛簡介
Term list block. Displays a list of all terms in the selected taxonomy.
You can change the display by placing a template file in your theme.
template-parts/blocks/terms-block/block-name–block-style.php
template-parts/blocks/terms-block/block-name.php
Filter for get_terms.
add_filter( 'terms_block_get_terms_arguments', 'my_filter', 10, 3 );
function my_filter( $args, $taxonomy, $attributes ) {
$args = array_merge( $args, array( 'orderby' => 'order' ) );
return $args;
}
