カート、フッター、およびアカウント ページの Storefront ハンドヘルド フッター バーを非表示にしようとしています。私はWordpressとWoocommerceでコーディングするのが初めてで、次のコードをコーディングしましたが、何も機能しません. 以下は私の3つの試みです。何が間違っていますか? どんな援助でも大歓迎です。
add_action('wp_head','noshowHHFCSS');
function noshowHHFCSS() {
echo '<style>
/* Do not show hand held footer bar on cart, check out and account page*/
.page-id-5 .page-id-6 .page-id-7 .storefront-handheld-footer-bar {
display: none!important;
}
</style>';
}
if ( is_cart() || is_checkout() || is_account_page() ) {
echo '<style>
/* Do not show hand held footer bar on cart, check out and account page*/
.storefront-handheld-footer-bar {
display: none!important;
}
</style>';
}
add_action( 'init', 'jk_remove_storefront_handheld_footer_bar' );
if ( is_cart() || is_checkout() || is_account_page() ) {
function jk_remove_storefront_handheld_footer_bar() {
remove_action( 'storefront_footer', 'storefront_handheld_footer_bar', 999 );
}
}