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 用户也希望您的参与。

文章没看懂?代码不会用?需要帮助您可以去论坛提问自助服务台

作者小新

大象、大象 ,你的鼻子怎么那么长 ,妈妈说鼻子长才是漂亮 ......