順に解説させていただきます。下記で紹介するコードは、[外観 > テーマ - テーマエディター]から 子テーマのfunctions.phpに貼り付けてください。
下記のコードで全てのページでパンくずリストが表示されなくなります。
add_action('wp',function(){
$header = QB\Diver\Frontend\Partials\Header::getInstance();
remove_action( 'diver_body_before', [$header, 'breadcrumb'],20 );
});
先ほどのコードの中に add_action( 'diver_body_after', [$header, 'breadcrumb'],20 ); を追加すると、フッターの位置にパンくずを表示移動させることができます。
add_action('wp',function(){
$header = QB\Diver\Frontend\Partials\Header::getInstance();
remove_action( 'diver_body_before', [$header, 'breadcrumb'],20 );
add_action( 'diver_body_after', [$header, 'breadcrumb'],20 );
});
投稿ページや固定ページのみでこれを実行させるために先ほどのコードに条件を追加します。
add_action('wp',function(){
if(is_singular()){
$header = QB\Diver\Frontend\Partials\Header::getInstance();
remove_action( 'diver_body_before', [$header, 'breadcrumb'],20 );
add_action( 'diver_body_after', [$header, 'breadcrumb'],20 );
}
});