什么是WordPress主题框架? 优点,缺点等

Recently, one of our users asked us the question what is a WordPress theme framework? Before answering her question we did a quick search, and the results were surprising. There was not a single comprehensive article that explained what is a WordPress theme framework. Majority of the articles were sites listing the top free WordPress theme frameworks or WordPress theme frameworks compared etc. Then there were some theme framework websites ranking among the top. In this article, we will do our best to answer questions like what is a WordPress theme framework, what type of theme frameworks exist, why do people use WordPress theme frameworks, advantages and disadvantages of using a theme framework, should you use a theme framework, and lastly what is our pick for the best WordPress theme framework.

最近,我们的一位用户问我们一个问题,WordPress主题框架是什么? 在回答她的问题之前,我们进行了快速搜索,结果令人惊讶。 没有一篇全面的文章解释什么是WordPress主题框架。 大多数文章是列出列出免费WordPress主题框架或比较过的WordPress主题框架的网站。然后,有一些主题框架网站排在前列。 在本文中,我们将尽力回答以下问题:什么是WordPress主题框架,存在哪种类型的主题框架,人们为什么使用WordPress主题框架,使用主题框架的优缺点,是否应该使用主题框架,最后我们选择最佳的WordPress主题框架是什么。

什么是WordPress主题框架? (What is a WordPress Theme Framework?)

The term WordPress theme framework often refers to a code library that is used to facilitate development of a theme. In the old days of WordPress, there were some crucial problems with the way how themes were developed and maintained. There was no good way of upgrading WordPress themes without losing all the custom styling options. There was no way to prevent copying and pasting of the same functionality code in all themes. While these two issues might not seem like a problem to an average user, these can be disastrous for a few reasons. What if you realized that the same code that you had been using in all of your themes had a security exploit. Even more important, what if this theme was something that you publicly released for others to download and customize. Yes, that’s chaos waiting to happen. The core team and community decided to fix the issues mentioned above by introducing the concept of Parent Theme and Child Theme.

术语WordPress主题框架通常是指用于促进主题开发的代码库。 在WordPress的旧时代,主题的开发和维护方式存在一些关键问题。 没有丢失所有自定义样式选项的升级WordPress主题的好方法。 没有办法防止在所有主题中复制和粘贴相同的功能代码。 尽管这两个问题对普通用户而言似乎不是问题,但由于某些原因,这可能是灾难性的。 如果您意识到在所有主题中使用的相同代码具有安全漏洞,该怎么办? 更重要的是,如果该主题是您公开发布供他人下载和自定义的主题,该怎么办。 是的,那是混乱的等待。 核心团队和社区决定通过引入“父主题”和“子主题”的概念来解决上述问题。

WordPress theme frameworks are intended to be used as a parent theme template where all the functionality resides. Developers can then create a child theme to add custom styling while leaving the functionality aspects of it to the framework. This allows for a centralized location where all the functions are hosted. If the core development team decide to deprecate a WordPress function, or there is a bug found in a specific theme framework, then it is extremely easy to push out an update without modifying anything the child theme has. This method allows you to keep the “framework” of your site strong without modifying how it looks.

WordPress主题框架旨在用作所有功能所在的父主题模板。 然后,开发人员可以创建一个子主题以添加自定义样式,同时将其功能方面留给框架。 这允许托管所有功能的集中位置。 如果核心开发团队决定弃用WordPress功能,或者在特定主题框架中发现错误,那么在不修改子主题具有任何内容的情况下推出更新非常容易。 这种方法使您可以保持网站的“框架”牢固,而无需修改其外观。

存在哪种类型的主题框架? (What type of Theme Frameworks exist?)

Well there are Free one and paid ones… Ok seriously, there are a few type of frameworks that exist. There are complete drag & drop frameworks like Headway Themes that empower users to create everything visually without any knowledge of code. Then there are pseduo-drag drop frameworks like Pagelines and Thesis. These frameworks allow users to drag and drop pre-define sections (similar to how WordPress widgets work). Obviously anyone can define custom sections using the available hooks and filters offered by the frameworks. Then there are theme frameworks that are full of options. Themify and most others fall in this category. Lastly, there are the theme frameworks that are built for developers to get a head start without the clutter and bloat like Genesis by StudioPress.

好吧,有免费的和付费的……好吧,好的,有几种类型的框架存在。 像Headway Themes这样的完整拖放框架使用户无需任何代码知识即可直观地创建所有内容。 然后是pseduo-drag拖放框架,例如PagelinesThesis 。 这些框架允许用户拖放预定义的部分(类似于WordPress小部件的工作方式)。 显然,任何人都可以使用框架提供的可用挂钩和过滤器来定义自定义部分。 然后是充满选择的主题框架。 Themify和其他大多数类别。 最后,像StudioPress的Genesis一样,为开发人员构建了主题框架,以使开发人员能够抢先一步,而又不会造成混乱和膨胀。

人们为什么使用WordPress主题框架? (Why do people use WordPress theme frameworks?)

The main reason is to speed up their development. Theme frameworks drastically reduce the development time. The development time is improved because all theme frameworks offer a great deal of functionality and customization options, so the user does not have to code everything themselves. These features can range anywhere from (drag-drop functionality, sliders, SEO widgets, and more). Instead of creating a theme from scratch and modifying all the files, creating a child theme can be as simple as creating a new style.css file and customize a few functions using the functions.php file.

主要原因是加快他们的发展。 主题框架大大减少了开发时间。 由于所有主题框架都提供了大量功能和自定义选项,因此缩短了开发时间,因此用户不必自己编写所有代码。 这些功能的范围很广(拖放功能,滑块,SEO小部件等)。 不必从头开始创建主题并修改所有文件,而是创建子主题就像创建新的style.css文件并使用functions.php文件自定义一些函数一样简单。

优点和缺点是什么? (What are the advantages and disadvantages?)

Like with most things, there are advantages and disadvantages to using a WordPress theme framework. Let’s take a look at both.

与大多数事物一样,使用WordPress主题框架也有其优点和缺点。 让我们看看两者。

Advantages

优点

  • Community – Most popular theme frameworks have a huge community behind it. This makes it much easier to get your support questions answered.

    社区–大多数流行的主题框架背后都有一个庞大的社区。 这样可以更轻松地解答您的支持问题。
  • Ease of development – As we mentioned previously that using a theme framework can drastically reduce the development time and make things easier over the long run.

    易于开发–正如我们之前提到的,使用主题框架可以从根本上减少开发时间,并且从长远来看使事情变得更容易。
  • Built-in functionality – Theme frameworks comes with built-in widgets, and additional functionality.

    内置功能–主题框架带有内置小部件和其他功能。
  • Code Quality – Often theme frameworks are peer reviewed, so it is much more likely to follow all best practices.

    代码质量–主题框架通常经过同行评审,因此很有可能遵循所有最佳实践。
  • Upgrades – The ability to upgrade without losing any styling functionality of child themes is a great plus.

    升级–能够在不丢失子主题的任何样式功能的情况下进行升级的功能非常不错。

Disadvantages

缺点

  • Learning Curve – Most frameworks have their own hooks and filters. To utilize the full power of the framework, you must familiarize yourself of the framework specific lingo. So your first few child themes might take you longer just because you are learning things.

    学习曲线–大多数框架都有自己的挂钩和过滤器。 要利用框架的全部功能,您必须熟悉框架特定的术语。 因此,您最初的几个儿童主题可能会因为您正在学习而使您花费更长的时间。
  • Unnecessary Code – Frameworks come with tons of built-in functionality which you may not use. This is not such a huge deal because it doesn’t directly influence you.

    不必要的代码–框架附带了大量您可能不使用的内置功能。 这并不是什么大问题,因为它不会直接影响您。
  • Framework Limitations – Often frameworks have limitations. Sometimes to achieve super customizations, you might have to override core files or submit a patch to be included in the future updates.

    框架局限性–框架通常具有局限性。 有时要实现超级自定义,您可能必须覆盖核心文件或提交修补程序以包含在将来的更新中。
  • Price – Most theme frameworks are not free. There is either a one time fee or an annual fee to receive updates and support.

    价格–大多数主题框架不是免费的。 收取更新和支持费用为一次性费用或年费。
您应该使用主题框架吗? (Should You Use a Theme Framework?)

Even though there is a learning curve, and they cost a little bit of extra money, in our opinion you should use a theme framework. Overtime, they speed up development time. It allows you to follow industry standards. Last but not least, you get great support from the developing team as well as others who are part of the community.

即使存在学习曲线,并且它们花费一点额外的钱,但我们认为您应该使用主题框架。 加班,他们加快了开发时间。 它使您可以遵循行业标准。 最后但并非最不重要的一点是,您将获得开发团队以及社区中其他成员的大力支持。

我们的选择 (Our Pick)

There are tons WordPress theme frameworks that are available. WPBeginner is powered by Genesis framework by StudioPress. You can read more about why we use Genesis. It is a great framework for development. It is not bloated like others with tons of options. You get just what you need. It plays nice with most other plugins that exist. Yes, you do need to have development skills to code a child theme for this.

有大量可用的WordPress主题框架。 WPBeginner由StudioPressGenesis框架提供支持 。 您可以阅读有关我们为什么使用Genesis的更多信息。 这是一个伟大的发展框架。 它不会像其他具有大量选择的产品那样ated肿。 您得到所需的东西。 它可以与现有的大多数其他插件配合使用。 是的,您确实需要具有开发技能才能为此编写儿童主题。

For beginners, you should consider using a framework like Headway Themes. They have a drag-drop interface that lets you create websites using a visual interface.

对于初学者,您应该考虑使用诸如Headway Themes之类的框架。 它们具有拖放界面,可让您使用可视界面创建网站。

We hope that this article helps you understand what is a WordPress Theme Framework, and if you should use it or not. If you think we missed something, then please let us know in the comments. If you are using a framework on your site, then let us know in the comments which one. Why do you prefer to use the framework that you do. Looking forward to hearing your responses.

我们希望本文能帮助您了解什么是WordPress主题框架,以及是否应该使用它。 如果您认为我们错过了某些事情,请在评论中告知我们。 如果您在网站上使用的是框架,请在评论中告知我们哪个框架。 您为什么更喜欢使用您所做的框架。 期待听到您的答复。

翻译自: https://www.wpbeginner.com/beginners-guide/what-is-a-theme-framework/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值