wordpress入门主题_WordPress入门主题的简单指南

wordpress入门主题

This article was originally published by Torque Magazine, and is reproduced here with permission.

本文最初由《扭矩杂志》(Torque Magazine)出版,经许可转载于此。

Starting completely from scratch when developing themes naturally means you’re free to do anything you’d like. This opens up plenty of room for creative freedom, but getting started can take up a lot of time. Many of the initial tasks you’ll carry out are necessary, yet time-intensive.

自然地开发主题时,完全从头开始就意味着您可以自由地做任何想做的事情。 这为创造自由提供了足够的空间,但是入门可能会花费很多时间。 您将要执行的许多初始任务是必要的,但很耗时。

The good news is that WordPress “starter” themes or frameworks (also called “blank” themes) can do some of the initial heavy lifting for you. This is because they include foundational base code for you to work from. They can help you implement essential functionality, and start you off with some best practices relevant to the task at hand.

好消息是WordPress的“入门”主题或框架(也称为“空白”主题)可以为您做一些初期的繁重工作。 这是因为它们包括供您使用的基础代码。 它们可以帮助您实现基本功能,并从与手头任务相关的一些最佳实践入手。

In this article, we’ll discuss what starter themes are and why they can be so useful. Next, we’ll run through some of the top performers, such as Underscores, FoundationPress, and Bones. Let’s dive in!

在本文中,我们将讨论什么是入门主题,以及为什么它们如此有用。 接下来,我们将介绍一些表现最好的公司,例如UnderscoresFoundationPressBones 。 让我们潜入吧!

入门主题简介 (An Introduction to Starter Themes)

For the uninitiated, a starter theme — otherwise known as a “blank” theme — provides a basic skeleton you can develop on top of. However, unlike standard WordPress themes, they only include very basic structural code. There’s just enough there to get the theme to work, and let you implement any foundational functionality. They’re also not meant to be used as parent themes themselves, but as the basis for your parent theme.

对于初学者来说,入门主题(也称为“空白”主题)提供了可以在其上进行开发的基本框架。 但是,与标准WordPress主题不同,它们仅包含非常基本的结构代码。 有足够的空间使主题起作用,并让您实现任何基本功能。 它们也不是要用作父主题 ,而是作为父主题的基础

Starter themes can be extremely handy for development purposes. Here are just a few of the reasons why:

入门主题对于开发目的可能非常方便。 这只是其中的一些原因:

  • You get a head start on coding the essential foundations of your theme.

    您将在编码主题的基本基础方面获得领先。
  • They provide insight into the best practices you’ll want to follow.

    他们提供您想要遵循的最佳实践的见解。
  • You have the flexibility to code a custom theme, while still getting a quality base to work from.

    您可以灵活地编写自定义主题,同时仍可以使用质量基础。

Of course, no starter theme is perfect, and you’ll need to consider a few things before deciding whether it’s worth using one. For example, you’ll still be playing by another developer’s rules, and they get to decide what functionality is considered foundational. This means the theme could be packed with snippets that don’t actually help you create the kind of theme you need.

当然,没有任何入门主题是完美的,并且在决定是否值得使用前,您需要考虑一些事项。 例如,您仍然会遵循其他开发人员的规则,而他们可以决定哪些功能被视为基础。 这意味着主题可能包含很多片段,这些片段实际上并不能帮助您创建所需的主题。

In addition, you may still need some time to pick through the code to get a handle on what the theme does out of the box. Of course, starter themes aren’t necessarily ready to roll by default, which can be a confusing concept to grasp at times.

此外,您可能仍需要一些时间来仔细阅读代码,以方便地了解主题的功能。 当然,默认情况下不一定必须启动入门主题,这有时可能会让人感到困惑。

All the same, unless you’re working with a particular theme (for example, we’ve seen developers using themes such as Divi and Avada as their base), we think starter themes are an excellent tool for the majority of WordPress developers. If you decide to implement one, the next important question is which to choose.

都是一样,除非您使用的是特定主题(例如,我们已经看到开发人员使用DiviAvada等主题作为基础),否则我们认为入门主题对于大多数WordPress开发人员而言都是一个很好的工具。 如果您决定实施一个,那么下一个重要的问题就是选择哪个。

下一个项目要考虑的5个顶级WordPress入门主题 (5 Top WordPress Starter Themes to Consider for Your Next Project)

In another article at Torque, we looked briefly at a larger collection of starter themes. However, we’ll now take some of the standout options and examine them more closely. The solutions in the list below are mostly free, but we’ll clearly mention when there’s a price involved.

在Torque的另一篇文章中,我们简要介绍了更多的入门主题 。 但是,我们现在将采用一些出色的选项,并仔细研究它们。 以下列表中的解决方案大部分是免费的,但是当涉及价格时,我们会明确提及。

Let’s start with a theme that definitely has the WordPress seal of approval.

让我们从一个绝对具有WordPress认可印章的主题开始。

1. 下划线 (1. Underscores)

The Underscores theme

Underscores is arguably the best-known starter theme available. It’s developed and maintained by Automattic (i.e. WordPress’ developers), and was originally a fork of the Toolbox theme. The tagline for Underscores is that it offers you a “1,000-hour head start” when developing themes.

下划线可以说是最有名的入门主题。 它由Automattic (即WordPress的开发人员)开发和维护,最初是Toolbox主题的分支。 Underscores的口号是在开发主题时为您提供“ 1,000小时的领先优势”

In fact, every default theme worked on by WordPress (from Twenty Twelve onward) uses Underscores as a base:

实际上,WordPress(从二十二开始)使用的每个默认主题都使用下划线作为基础:

The Twenty Twelve theme

Of course, the main selling point here is that you’re getting WordPress’ best practices in one handy package. It’s going to be simple, therefore, to create a valid theme based on WordPress’ requirements. However, unless you have some deft coding chops, it’s also very easy to accidentally create another “me too” WordPress theme.

当然,这里的主要卖点是您可以通过一个便捷的软件包获得WordPress的最佳实践 。 因此,根据WordPress的要求创建有效的主题将非常简单。 但是,除非您有一些巧妙的技巧,否则意外创建另一个“我也是” WordPress主题也很容易。

If you’re interested in trying out Underscores, we previously published The Beginner’s Guide to Creating a Theme With Underscores, which does exactly what it says on the box. You may also want to look at the WordPress Theme Development Guide, as this will also show you how the code is structured at a base level.

如果您有兴趣尝试使用Underscores,我们之前已经发布了《使用Underscores创建主题的初学者指南》 ,该手册的功能与包装盒上的内容完全相同。 您可能还需要查看WordPress主题开发指南 ,因为这还将向您展示代码的基本结构。

2. FoundationPress (2. FoundationPress)

The FoundationPress website

Next up, FoundationPress is an open-source starter theme built on Foundation 6, which uses Sass and Grunt. It was released in 2013, continues to be regularly updated by a community of developers, and is billed as the “most advanced mobile-first framework in the world”.

接下来, FoundationPress是一个基于Foundation 6的开源入门主题,该主题使用SassGrunt 。 它于2013年发布,并由开发人员社区定期进行定期更新,被誉为“世界上最先进的移动优先框架”。

You’ll usually see FoundationPress used to develop custom themes for specific businesses and groups. The GitHub page has a showcase outlining the many websites currently using the starter theme. This includes the Harvard Center for Green Buildings and Cities:

您通常会看到FoundationPress用于为特定企业和团体开发自定义主题。 GitHub页面上有一个展示柜,概述了当前使用入门主题的许多网站。 这包括哈佛绿色建筑和城市中心

The Harvard Center for Green Buildings and Cities website

This theme is ideal if you’re looking to develop for business-specific purposes. On the flip side, that means there aren’t as many themes you can download to get a feel for how FoundationPress is used in the “real-world”. Your best bet is to take a look at the Kitchen Sink template, and read through the theme’s thorough documentation.

如果您要针对特定​​业务目的进行开发,则此主题非常理想。 从另一方面来说,这意味着您可以下载的主题数量不多,无法了解FoundationPress在“现实世界”中的使用方式。 最好的选择是看一下厨房水槽模板 ,并仔细阅读主题的详尽文档

3. 骨骼 (3. Bones)

The Bones website

Bones is another free, mobile-first starter theme with built-in Sass integration. However, the primary focus here is on speed. For example, Bones comes with a light header out of the box, which is in contrast to many other WordPress starter themes. What’s more, it gives you a “leg-up” when getting to know its inner workings. That’s because Bones comes pre-loaded with custom dashboard functions and post types, so you can see how they work by default.

Bones是另一个免费的,移动优先的入门主题,具有内置的Sass集成。 但是,这里的主要重点是速度。 例如,Bones开箱即用,带有轻头,这与许多其他WordPress入门主题相反。 此外,当您了解其内部工作原理时,它可以使您“振作起来”。 这是因为Bones预装了自定义仪表板功能和帖子类型,因此您可以查看它们默认情况下的工作方式。

While ease of use is a perk of Bones, this also presents some drawbacks. Given the amount of helpful code included by default, more experienced users of the theme may be annoyed at having to strip away all the elements they don’t need. There’s also no showcase available, which makes it difficult to determine how Bones will translate into a real-world theme.

尽管易用性是Bones的一个优点,但这也带来了一些缺点。 考虑到默认情况下包含的有用代码数量,该主题的更多有经验的用户可能会因为不得不剥离他们不需要的所有元素而感到恼火。 也没有可用的展示柜,这使得很难确定Bones如何转换为现实世界的主题。

Even so, following a decent tutorial can help you have a working theme ready in a flash. Getting hands-on immediately is never a bad thing when it comes to a new tool, and Bones makes it very simple to do that.

即使这样,遵循一个不错的教程也可以帮助您快速准备好工作主题。 对于新工具而言,立即动手操作从来都不是一件坏事,而Bones使其非常简单。

4. 创世纪框架 (4. The Genesis Framework)

The StudioPress website

For our penultimate theme, we’re going off the beaten track to look at a “framework” — more specifically, the Genesis Framework. This is the only premium solution on our list (with plans starting at $60), and it requires you to develop using child themes rather than editing the framework directly. Even so, it’s probably the most developer-friendly theme on this list. Plus, it uses WordPress’ hooks to assist you in creating your themes.

对于倒数第二个主题,我们不去关注“框架”,更具体地说是Genesis Framework 。 这是我们列表中唯一的高级解决方案(计划起价为60美元),它要求您使用子主题进行开发,而不是直接编辑框架。 即使这样,它也可能是此列表中最适合开发人员的主题。 另外,它使用WordPress的挂钩来帮助您创建主题。

There’s a burgeoning market for Genesis child themes. You’ll find a plethora of examples on the StudioPress website, along with third-party developers offering their own themes (such as Imagely):

创世纪儿童主题市场蓬勃发展。 您可以在StudioPress网站上找到大量示例,以及提供自己主题的第三方开发人员(例如Imagely ):

An example of a Genesis child theme

Without a doubt, the wealth of resources and documentation available is a stand-out benefit of Genesis. Developers such as Carrie Dils are well experienced with the framework, and her Lynda portfolio contains a number of Genesis-specific courses worth checking out. However, there is a cost involved. Also, the need to develop child themes for use with the framework can translate into extra hassle that a client may not want.

毫无疑问,可用的大量资源和文档是Genesis的突出优势。 诸如Carrie Dils之类的开发人员在该框架方面经验丰富,她的Lynda产品组合包含许多特定于Ge​​nesis的课程,值得一试。 但是,这涉及成本。 同样,开发与框架一起使用的子主题的需求可能转化为客户可能不希望的额外麻烦。

As we mentioned, Carrie Dils is the go-to Genesis queen. As far as we’re concerned, her courses on Learning Genesis for WordPress and WordPress and Genesis: Building Child Themes From Scratch can be considered the “gospel” for developing with this framework.

正如我们提到的,嘉莉·迪尔斯(Carrie Dils)是创世纪的女王。 就我们而言,她关于WordPressWordPress的 学习创世纪 和创世纪:从头开始构建儿童主题的课程可以被视为使用该框架进行开发的“福音”。

5. HTML5空白 (5. HTML5 Blank)

The HTML5 Blank theme

HTML5 Blank rounds off our list, and is no less powerful than some of the other options. It’s an open-source theme, similar to Bones and FoundationPress, but it prides itself on delivering a simple way to convert standard HTML and CSS into WordPress:

HTML5 Blank完善了我们的列表,其功能不亚于某些其他选项。 这是一个开源主题,类似于Bones和FoundationPress,但它以提供一种将标准HTML和CSS转换为WordPress的简单方法而自豪:

Unfortunately, much like some of the other starter themes on this list, HTML5 Blank doesn’t have a showcase. So finding real-world success stories can be tough. However, the theme does follow WordPress’ coding standards, and the GitHub profile contains plenty to sink your teeth into when beginning your development.

不幸的是,与该列表中的其他一些其他入门主题一样,HTML5 Blank没有展示。 因此,找到现实世界的成功故事可能很困难。 但是,该主题确实遵循WordPress的编码标准,并且GitHub配置文件包含许多内容,可在开始开发时投入您的牙齿。

HTML5 Blank is the only theme on this list to have little third-party documentation available on how to get started with it. That’s a shame, because it has a lot of support and can be an excellent tool. If you’re a beginner to starter themes, however, you may need to look elsewhere to get your feet wet.

HTML5 Blank是此列表上唯一的主题,几乎没有关于如何开始使用的第三方文档。 真可惜,因为它得到了很多支持,并且可以成为出色的工具。 但是,如果您是入门主题的初学者,则可能需要寻找其他地方来弄湿自己的脚。

结论 (Conclusion)

Using WordPress starter themes in your workflow can help you create a ready-to-go WordPress theme in less time than if you started completely from scratch. For this reason, they should be a go-to development tool, regardless of your expertise.

与完全从头开始相比,在工作流程中使用WordPress入门主题可以帮助您以更少的时间创建现成的WordPress主题。 因此,无论您的专业知识如何,它们都应该成为开发工具

This piece has looked at five of the top starter themes available. Let’s quickly recap each one:

本文探讨了五个可用的顶级入门主题。 让我们快速回顾一下每个:

  1. Underscores: Automattic’s offering is a great option, regardless of your initial expertise.

    强调无论您最初的专业知识如何,Automattic的产品都是一个不错的选择。

  2. FoundationPress: This is a mobile-friendly, open-source starter theme that’s great when creating custom themes for specific purposes.

    FoundationPress :这是一个便于移动的开放源代码入门主题,在创建用于特定目的的自定义主题时非常有用。

  3. Bones: This is arguably the best beginner theme on the list, given the wealth of handy tips and advice it provides.

    骨头 :考虑到它提供的大量便捷提示和建议,可以说这是列表中最好的初学者主题。

  4. Genesis: The only premium option here, this framework has the backing some of WordPress’ biggest names.

    创世纪(Genesis) :这里唯一的高级选项,该框架支持WordPress的一些大人物。

  5. HTML5 Blank: Finally, this is a bare-bones starter theme that will help translate standard HTML into WordPress-friendly code.

    HTML5空白 :最后,这是一个准入门级主题,它将帮助将标准HTML转换为WordPress友好代码。

Do you have any questions about how to use starter themes, or have a suggestion for one we’ve missed? Let us know in the comments section below!

您对如何使用入门主题有任何疑问,或者对我们错过的主题有任何建议吗? 让我们在下面的评论部分中知道!

翻译自: https://www.sitepoint.com/wordpress-starter-themes-guide/

wordpress入门主题

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值