从博客文章中删除作者的姓名
已于 Dec 08, 2023 打印了此页面。若要查看当前版本,请访问 https://help.shopify.com/zh-CN/manual/online-store/themes/themes-by-shopify/vintage-themes/customizing-vintage-themes/remove-author-name。
备注:本教程的步骤将根据您使用的是分区模板还是未分区模板而有所不同。分区模板支持通过拖放来安排主页的布局,未分区模板则不支持。
如果想了解您的模板是否支持分区,请转到模板的编辑代码页面。如果 Sections 目录中有文件,您则正在使用已分区模板。未分区模板是在 2016 年 10 月之前发布的,并且 Sections 目录中没有文件。
如果您使用已分区模板,请点击 Sectioned themes(已分区模板)按钮并按照说明进行操作。如果您使用较旧的未分区模板,请点击 Non-sectioned themes(未分区模板)按钮并按照说明进行操作。
本页相关主题
删除作者的姓名
若要删除博客作者的姓名,您需要编辑 blog.liquid
和 article-template.liquid
模板中的 Liquid。如果您使用的是 Boundless,则需要编辑 blog.liquid
和 article.liquid
模板中的 Liquid。
步骤:
- 在 Shopify 后台中,转至在线商店 > 模板。
- 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。
- 在 Templates 文件夹中,点击
blog.liquid
。 - 在电脑上使用
ctrl
+F
或在 Mac 上使用command
+F
来找到此 Liquid 标记并将其删除:
{{ article.author }}
For **Simple** and **Supply**, the author and date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
- 点击保存。
- 在 Sections 文件夹中,点击
article-template.liquid
。对于 Boundless,请在 Templates 文件夹中点击article.liquid
。 - 在电脑上使用
ctrl
+F
或在 Mac 上使用command
+F
来找到此 Liquid 标记并将其删除:
{{ article.author }}
For **Simple** and **Supply**, the article author and article date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
- 点击保存。
- 在 Shopify 应用中,点击 … 按钮。
- 在销售渠道部分,轻触在线商店。
- 轻触管理模板。
- 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。
- 在 Templates 文件夹中,点击
blog.liquid
。 - 在电脑上使用
ctrl
+F
或在 Mac 上使用command
+F
来找到此 Liquid 标记并将其删除:
{{ article.author }}
For **Simple** and **Supply**, the author and date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
- 点击保存。
- 在 Sections 文件夹中,点击
article-template.liquid
。对于 Boundless,请在 Templates 文件夹中点击article.liquid
。 - 在电脑上使用
ctrl
+F
或在 Mac 上使用command
+F
来找到此 Liquid 标记并将其删除:
{{ article.author }}
For **Simple** and **Supply**, the article author and article date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
- 点击保存。
- 在 Shopify 应用中,点击 … 按钮。
- 在销售渠道部分,轻触在线商店。
- 轻触管理模板。
- 找到要编辑的模板,点击 ... 按钮打开操作菜单,然后点击编辑代码。
- 在 Templates 文件夹中,点击
blog.liquid
。 - 在电脑上使用
ctrl
+F
或在 Mac 上使用command
+F
来找到此 Liquid 标记并将其删除:
{{ article.author }}
For **Simple** and **Supply**, the author and date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
- 点击保存。
- 在 Sections 文件夹中,点击
article-template.liquid
。对于 Boundless,请在 Templates 文件夹中点击article.liquid
。 - 在电脑上使用
ctrl
+F
或在 Mac 上使用command
+F
来找到此 Liquid 标记并将其删除:
{{ article.author }}
For **Simple** and **Supply**, the article author and article date share the same liquid tag. To remove both, use `ctrl` + `F` on a PC or `command` + `F` on a Mac to locate this Liquid tag and delete it:
{{ 'blogs.article.author_on_date_html' | t: author: author, date: date }}
If you want to keep only the date, then replace the code above with:
{{ date }}
- 点击保存。