這一次我已經超出了期望:我已經透過 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 );    


可以在哪裡新增此程式碼?

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


這段程式碼是否正常可用?

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


需要關於 WooCommerce 的幫助?

請觀看我們提供的免費影片教程或到薇曉朵 WooCommerce 中文論壇提問,會有專業技術團隊提供相關幫助。