Storefront Theme 店面主題可視掛鈎指南

Storefront Theme 店面主題可視掛鈎指南

這一次我已經超出了期望:我已經通過 WooThemes(免費主題,擁有 50,​​000 多個主動安裝)創建了 Storefront 主題的視覺掛鈎指南。這個視覺指南屬於我的 “ 視覺鉤指南系列”,我已經放在一起,以便您可以通過查看他們的實際位置快速,輕鬆地找到 WooCommerce 鉤。此外,您可以在幾秒鐘內複製和粘貼,並加快您的定製時間。

讓我在評論中知道您對這個資源的看法!請享用!

 

店面主題 – 主頁掛鈎

Storefront Default add_actions

// These are actions you can unhook/remove!

// SIDEBAR

add_action( 'storefront_sidebar', 'storefront_get_sidebar', 10 );

// HEADER

add_action( 'storefront_header', 'storefront_skip_links', 0 );
add_action( 'storefront_header', 'storefront_site_branding', 20 );
add_action( 'storefront_header', 'storefront_secondary_navigation', 30 );
add_action( 'storefront_header', 'storefront_primary_navigation', 50 );

// FOOTER

add_action( 'storefront_footer', 'storefront_footer_widgets', 10 );
add_action( 'storefront_footer', 'storefront_credit', 20 );

// HOMEPAGE

add_action( 'homepage', 'storefront_homepage_content', 10 );
add_action( 'homepage', 'storefront_product_categories', 20 );
add_action( 'homepage', 'storefront_recent_products', 30 );
add_action( 'homepage', 'storefront_featured_products', 40 );
add_action( 'homepage', 'storefront_popular_products', 50 );
add_action( 'homepage', 'storefront_on_sale_products', 60 );
add_action( 'homepage', 'storefront_best_selling_products', 70 );

// POSTS

add_action( 'storefront_loop_post', 'storefront_post_header', 10 );
add_action( 'storefront_loop_post', 'storefront_post_meta', 20 );
add_action( 'storefront_loop_post', 'storefront_post_content', 30 );
add_action( 'storefront_loop_after', 'storefront_paging_nav', 10 );
add_action( 'storefront_single_post', 'storefront_post_header', 10 );
add_action( 'storefront_single_post', 'storefront_post_meta', 20 );
add_action( 'storefront_single_post', 'storefront_post_content', 30 );
add_action( 'storefront_single_post_after', 'storefront_post_nav', 10 );
add_action( 'storefront_single_post_after', 'storefront_display_comments', 20 );

// PAGES

add_action( 'storefront_page', 'storefront_page_header', 10 );
add_action( 'storefront_page', 'storefront_page_content', 20 );
add_action( 'storefront_page_after', 'storefront_display_comments', 10 );

如何添加此代碼?

1 、您可以將 PHP 代碼片段放置在主題或子主題的 functions.php 文件的底部(如果是 CSS 代碼,請添加到子主題的 style.css 文件底部)修改之前建議先備份原始文件,若出現錯誤請先刪除此代碼。

2 、 WordPress 4.9 後改進了主題編輯器,對於 CSS 代碼也可打開網站前台編輯器的【自定義】,複製代碼添加到自定義 css 中。

此代碼是否可用?

如需幫助或是您有更好的方案想分享?請到薇曉朵 WooCommerce 中文論壇留言告知,我們希望可以幫到更多國內的 WooCommerce 用戶也希望您的參與。

文章沒看懂?代碼不會用?需要幫助您可以去論壇提問自助服務台

作者小新

大象、大象 ,你的鼻子怎麼那麼長 ,媽媽說鼻子長才是漂亮 ......