2017-11-25 5 views
0

Ich versuche, die Storefront-Handheld-Fußzeile auf den Warenkorb, Fußzeile und Konto Seiten zu verbergen. Ich bin neu in Wordpress und WooCommerce zu codieren und codiert das Folgende und nichts funktioniert. Unten sind meine 3 Versuche, was mache ich falsch? Jede Hilfe wird sehr geschätzt.Hide Woocommerce Storefront Handheld-Fußzeile auf Einkaufswagen, Kasse und Konto

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); 
} 
} 

Antwort

0

Sie können so etwas wie dies versuchen: in Ihrem Root-Themenordner Erstellen Sie einen neuen Ordner namens CSS, wenn Sie noch keines haben. Danach erstellen Sie eine customFooterStyle.css Datei mit Ihrem Fußzeilenstil-Code darin.

Im function.php Ort dieser Code:

function footerBarStyle() { 
    wp_enqueue_style('custom_footer_css', get_template_directory_uri() . '/css/customFooterStyle.css'); 
} 
if(is_cart() || is_checkout() || is_account_page()){ 
    add_action('wp_enqueue_scripts', 'footerBarStyle'); 
} 
+0

Okay, habe ich dies ein Schuss und es hat nicht funktioniert. Das einzige, was dies betrifft, ist, die Storefronts Woocommerce css direkt in den Assets/Sass/Woocommerce-Ordnern zu ändern. Versuche noch ein paar Optionen, aber bisher keine Würfel. – user2974907

Verwandte Themen