In the first part of this tutorial series, I introduced the different types of theme frameworks and explained how they work.
Before you start building your theme framework, you need to consider how it works and what it will be used for, so that you can find the most suitable development path from the beginning.
In this lesson, I'll walk you through every aspect you need to consider, including whether your framework is open to the public, whether it will be used by non-programmers or developers, and other features you may want to add. .
Determining your development path requires two steps: first, determine how your theme framework will be used; second, on this basis, confirm all the content you need to include.
How to use your theme framework?
The way you use a theme framework will affect what you include and how you structure the framework.
Consider the following:
Is it just you or some other developers?
If your framework is only to meet your personal needs, you only need to consider your own needs when developing; however, in the long run, it is still very important to try to build it as robust as possible from the beginning. It makes sense, so you should:
If your theme framework will be provided to other developers (perhaps your colleagues), then in addition to adopting all the above practices, you may also need to:
Provided to developers or users?
Some theme frameworks are specifically intended for users who cannot code, who can extensively customize the theme framework without writing any code, while others are for developers and provide hooks and functions so that they can Use it to customize and extend your own framework. Others will do both, there will be a comprehensive user interface and an API (application programming interface).
Just because your framework will be used by non-developers doesn’t mean you want to release it to the public - you may have colleagues who are web designers and you want to give them access, or let your clients use your Frames to customize their website.
If your framework is aimed at users who cannot code, you need to consider:
If your target audience is some professional developers, They will use your theme framework in conjunction with their own child themes and/or plugins, so you may want to consider some of the above, but you also need to consider including features from the list below:
Public or not?
If you plan on releasing your framework to the public, there is a whole set of additional things to consider:
You also need to consider how to market your framework: even if it is free, if you want more people to use it, then you need to promote it through a website, other ways are Social media, search engine optimization (SEO), third-party theme stores, word of mouth, local gatherings, WordCamps conferences (non-profit conferences organized by WordPress users), etc.
What should your theme framework include?
A large part of your theme’s functionality will be determined by the needs of the users you just identified. When deciding on the audience for your theme framework, if possible, ask your audience what their specific needs are and then list some of the features your theme will include.
This list will include (but is not limited to) the following choices:
For these, confirmation is required:
In addition to these features determined by different user groups, you may also want to include other features, such as:
This list may change over time as your own needs and those of your users change. Make sure from the beginning that your framework is easily extensible and that you can add new functionality whenever you want.
Summary
Developing your own theme framework can be said to be a great initiative. This will save you a lot of development time in the long run, but it also takes a lot of work.
Spend some time to understand the audience who use the theme framework and what functions they need, because this is very meaningful and valuable to yourself and other users, and if you want to expand and modify the framework in the future, you can It will be much easier.
The above has introduced the decision on how to develop your WordPress theme framework, including aspects of the content. I hope it will be helpful to friends who are interested in PHP tutorials.