第 151 期 在 Header 和 Footer 轻松添加/删除 Shopify 模块和 App

点击这里查看 带字幕 视频教程    本期 YouTube 链接(免登录观看 4K)

本期介绍的功能,你的主题 99% 还没有。这既是增强版主题中的一项新功能,同时也作为一期教程,教你如何在自己的主题上进行操作,不论用哪款主题,原理都是通用的。

💡
操作方法见视频演示

Header 页眉部分

创建 section

header-group

Shopify 免费主题通用代码

{
 "type": "header",
 "name": "Header Group",
 "sections": {
   "header": {
     "type": "header",
     "settings": {}
   },
   "announcement-bar": {
   	 "type": "announcement-bar",
     "settings": {}
   }
 },
 "order": ["announcement-bar","header"]
}

极简通用代码

{
 "type": "header",
 "name": "Header Group",
 "sections": {
   "header": {
     "type": "header",
     "settings": {}
   }
 },
 "order": ["header"]
}

创建 section

footer-group

通用代码

{
 "type": "footer",
 "name": "Footer Group",
 "sections": {
   "footer": {
     "type": "footer",
     "settings": {}
   }
 },
 "order": ["footer"]
}

修改 theme.liquid 中引用

{% section 'announcement-bar' %}
{% section 'header' %}

改为

{% sections 'header-group' %}

{% section 'footer' %}

改为

{% sections 'footer-group' %}
第 143 期 一元开店 低成本拥有你自己的 Shopify 店铺
打造属于自己的Shopify网店,无需任何编程技能。这个网址提供了一键式 Shopify 店铺搭建服务,只需低成本就可以立即拥有属于自己的专业电子商务平台。限时福利:既可用于创建新的店铺,也可以创建测试店铺(例如免费试用插件 APP 等),避免测试插件时代码残留在主题中,拖慢店铺网速。

内容标签:   #B站教程,   #主题优化,   #店铺装修