てくてくあるく

WordPress の テーマ とか プラグイン に ついて 勉強しています

実は 少しだけ FSE に ついて 学習していました

その際に 気がついたのですが 6.0 で 仕様が 変わっていました

5.9 までは 各 パーツを 入れる ディレクトリ名が ‘block-templates’ ‘block-template-parts’ でしたが

6.0 からは ‘templates’ ‘parts’ が デフォルトになるみたいです

Block theme setup | Theme Developer Handbook | WordPress Developer Resources
https://developer.wordpress.org/themes/block-themes/block-theme-setup/

一応 ソースコードを 確認したところ 下位互換性のために 前の ディレクトリ名でも 動くようです

get_block_theme_folders() | Function | WordPress Developer Resources
https://developer.wordpress.org/reference/functions/get_block_theme_folders/
validate_current_theme() | Function | WordPress Developer Resources
https://developer.wordpress.org/reference/functions/validate_current_theme/

Deprecated path support since 5.9.0. と 書かれているので 直したほうが 良さそうですね

Related Article

管理ページで カスタム投稿タイプの デフォルトの並び順 を 変更する!!

詳細へ »

GitHub や Bitbucket から 直接 WordPress の 更新 を 使って テーマ や プラグイン を アップデートする

詳細へ »

自作 テーマ を テーマユニットテスト で 検査してみた

詳細へ »