説明
タームリストブロック。選択したタクソノミーの全タームリストを表示します。
テーマにテンプレートファイルを配置すれば、表示を変更できます。
- template-parts/blocks/terms-block/
block-name
–block-style
.php - template-parts/blocks/terms-block/
block-name
.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; }
ブロック
このプラグインは3個のブロックを提供します。
- Terms (Deprecated) Displays a list of all terms in the selected taxonomy. (Deprecated)
- Terms Displays a list of all terms in the selected taxonomy.
- Assigned Terms Displays a list of assigned terms in the selected taxonomy.
評価
2022年12月6日
This plugin does just what I wanted. It looks just like the Category List block out of the box. However, it would be better if there were some CSS classes applied to the markup to make it possible to style this block effectively.
貢献者と開発者
変更履歴
2.0.3
- use get_block_wrapper_attributes
2.0.2
- use @wordpress/server-side-render
2.0.0
- add assigned terms block
- rename terms-block to terms
1.0.0
- WordPress 5.8で動作確認
0.2.0
terms_block_get_terms_arguments
フィルターの追加- WordPress 5.6で動作確認
0.0.5
- 最初のリリース
0.0.1
- 内部リリース