shopify商店创建和应用博客文章模板步骤

2024-01-01 14:01:26
By 戒色

创建博客文章模板

您可以创建一个模板来自定义各篇博客文章的布局。例如,您可以为包含大量图片的文章创建一个模板,并使该模板仅用于博客中的某些文章。创建自定义博客文章模板需要了解一些编码知识。

步骤:

PC:

  1. 在 Shopify 后台中,转到在线商店 > 模板

  2. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 模板文件夹下,点击添加新模板

  2. 在下拉菜单中,选择文章选项,然后为模板命名。

  3. 点击创建模板

  4. 在在线代码编辑器中,对模板进行更改以自定义博客文章的样式。

  5. 点击保存

苹果系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分中,轻触在线商店

  3. 轻触 Manage themes(管理模板)。

  4. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 模板文件夹下,点击添加新模板

  2. 在下拉菜单中,选择文章选项,然后为模板命名。

  3. 点击创建模板

  4. 在在线代码编辑器中,对模板进行更改以自定义博客文章的样式。

  5. 点击保存

安卓系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分中,轻触在线商店

  3. 轻触 Manage themes(管理模板)。

  4. 找到要编辑的模板,然后点击操作 > 编辑代码

  1. 模板文件夹下,点击添加新模板

  2. 在下拉菜单中,选择文章选项,然后为模板命名。

  3. 点击创建模板

  4. 在在线代码编辑器中,对模板进行更改以自定义博客文章的样式。

  5. 点击保存

向博客文章应用模板

创建了至少一个新模板后,您即可将它应用于单独一篇文章。只有应用了模板的文章才会根据您设置的模板进行显示。如果您要通过快捷方法使一篇博客文章以某种方式显示,但您不希望博客中的所有文章都以此方式显示,使用博客文章模板会很有用。

步骤:

PC:

  1. 在 Shopify 后台中,转到在线商店 > 博客文章

  1. 点击要编辑的博客文章。

  2. 模板下拉菜单中选择一个模板。

  3. 点击保存

苹果系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分,轻触在线商店

  3. 轻触博客文章

  1. 点击要编辑的博客文章。

  2. 模板下拉菜单中选择一个模板。

  3. 点击保存

安卓系统:

  1. 在 Shopify 应用中,轻触商店

  2. 销售渠道部分,轻触在线商店

  3. 轻触博客文章

  1. 点击要编辑的博客文章。

  2. 模板下拉菜单中选择一个模板。

  3. 点击保存

Shopify商户官网原文详情:

Create a blog post template

You can create a template to customize the layout of individual blog posts. For example, you could create a template for posts that will feature a lot of images but that you only want to use for some of the posts in a blog. Creating customized blog post templates requires some knowledge of coding.

Steps:

PC:

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme you want to edit, and then click Actions > Edit code.

  1. Under the Templates folder, click Add a new template.

  2. In the drop-down menu, select the article option, and then name your template.

  3. Click Create template.

  4. In the online code editor, make your changes to the template to customize the blog post style.

  5. Click Save.

iPhone:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. Under the Templates folder, click Add a new template.

  2. In the drop-down menu, select the article option, and then name your template.

  3. Click Create template.

  4. In the online code editor, make your changes to the template to customize the blog post style.

  5. Click Save.

Android:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Manage themes.

  4. Find the theme you want to edit, and then click Actions > Edit code.

  1. Under the Templates folder, click Add a new template.

  2. In the drop-down menu, select the article option, and then name your template.

  3. Click Create template.

  4. In the online code editor, make your changes to the template to customize the blog post style.

  5. Click Save.

Apply a template to a blog post

After you create at least one new template, you can apply a template to an individual post. Only the posts that have the template applied will appear according to the template you set. Using blog post templates can be useful when you want a shortcut to making a blog post look a certain way, but you don't want to use it fore very post in the blog.

Steps:

PC:

  1. From your Shopify admin, go to Online Store > Blog Posts.

  1. Click the blog post that you want to edit.

  2. In the Template drop-down menu, select a template.

  3. Click Save.

iPhone:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Blog posts.

  1. Click the blog post that you want to edit.

  2. In the Template drop-down menu, select a template.

  3. Click Save.

Android:

  1. From the Shopify app, tap Store.

  2. In the Sales channels section, tap Online Store.

  3. Tap Blog posts.

  1. Click the blog post that you want to edit.

  2. In the Template drop-down menu, select a template.

  3. Click Save.

文章内容来源:Shopify商户官方网站



(本文内容根据网络资料整理和来自用户投稿,出于传递更多信息之目的,不代表本站其观点和立场。本站不具备任何原创保护和所有权,也不对其真实性、可靠性承担任何法律责任,特此声明!)


常见问答(FQAS)


1. 如何在Shopify商店添加博客文章?

登陆您的Shopify管理后台,选择\"文章\"选项,然后点击\"新增文章\"按钮添加新的博客文章。您可以设置文章标题、内容和发布日期。发布文章后,它就可以在您的商店博客首页显示出来了。

2. Shopify博客文章可以使用什么模板?

Shopify支持使用Liquid模板语言定制博客文章的展现样式。您可以编辑当前主题下的article.liquid文件,定制文章页和列表页的模板代码。也可以从模板库下载别人已经做好的博客文章模板插件使用。

3. 如何在博客文章中嵌入图片?

您可以将图片上传到商店的媒体库里,然后在文章编辑器中使用图片短代码{% image id:image-id %}将图片嵌入文章内容中。或者使用HTML 标签手动插入图片链接也可以实现图片嵌入。

4. 我能否将博客文章与产品进行关联?

是的,Shopify允许您将博客文章与产品页面进行关联,点击文章中的产品名称或图片将自动跳转到相关产品详情页。您需要在文章编辑器中使用产品短代码{% product product.handle %}来指定文章与哪个产品进行关联。