私は、子供のテーマの使用は常に良いことだと宣伝してきましたが、常にButがあります...
テンプレートの上書きの例では、テーマの作成者がサイドバーテンプレートに独自の改善点を追加していることを想像してみましょう。
/themes/template/sidebar.php
<?php
/**
* The template for the sidebar containing the main widget area
*
* @link https://developer.wordpress.org/themes/basics/template-files/#template-partials
*/
if ( is_active_sidebar( 'sidebar-1' ) ) : ?>
<aside id="secondary" class="sidebar widget-area" role="complementary">
<?php dynamic_sidebar( 'sidebar-1' ); ?>
</aside><!-- .sidebar .widget-area -->
<?php endif; ?>
私たちの子供のテーマは/themes/child-theme/sidebar.php
独自のファイルでテンプレートを上書きしているので、私たちのウェブサイトは新しいrole="complementary"
仕様の恩恵を受けません
アップデートの差し迫ったケースでは、changelogを注意深く見て、必要に応じて子供のテーマファイルを更新するように、テンプレートを上書きするかどうかを追跡するのはウェブサイトの管理者としての私たちの責務です。