The main content of the internal pages or blog articles is often dull and can be easily created using the default Gutenberg editor. The following image is what we can achieve easily using Gutenberg Editor.
But this is not the case with the Homepage. In fact, not just the Homepage. Every page on your site with complex layout and heavy content. For Example, Our Dosth site’s Homepage.
We have two goals when building page’s main content:
“Least bad way? What does that even mean?”
Here is the reality my friend. There is no standard way to build a page with complex layout and content.
I had this same question and took it to WordPress-StackExchange for an answer and Rarst gave a fitting answer that made sense. Here is it:
Although the question is about Theme Development for mass distribution, Rarst’s answer applies to “Theme development for a client” too.
Get it?
Anyway, let’s take a look at all the available approaches and let’s pick one of them to build our Homepage.
There are six approaches to build the content of a Complex Page ( From a Theme Developer’s perspective )
Every one of the above-mentioned methods has pros and cons.
But it’s the cons that bother me a lot.
It totally depends on the budget of the client.
If the client strives to build their website by maintaining all the best possible standards and if the budget is not all a constraint, I will go with the third approach, that is, building the content of a complex page using Multiple WordPress pages.
But, most of the time, this is not the reality. Most of the clients just want their website done within a very short span of time like 45 hours, 60 hours etc. and if this is the case, I will go with the sixth approach, that is building the page’s content with the help of Custom Fields and Gutenberg Editor.
Now, WordPress allows us to create custom fields, but it takes a lot of time to build robust custom fields and we shouldn’t build these custom fields inside our theme, if we do so, when the client switches from our theme, the custom fields that came with our theme are gone too.
So, I will rely on a plugin like ACF to create custom fields within minutes. ACF ( Advanced Custom Fields ) is a very reliable plugin for developers and it’s worth the risk.
“Why this combination? Why can’t you just go with the Custom Fields approach totally?”
Simple. Every page has some content that is really important. And most often, this is the content that the page will get started with. So, I always try to build this content using the features that ship by default with WordPress. I Just want this content to be accessible to the visitors even if the ACF or RMB2 plugins fail.
Again, these are my personal preferences. But follow them unless you have a better approach.
I am gonna go with the combination of custom fields with the ACF plugin and the Gutenberg editor to build the Homepage because this is the reality. Not only that, but I also want to walk you through how a Plugin like ACF gets integrated with your theme.
Now, this approach only works if you are developing the theme for a client. But if you are creating a theme for mass distribution, you have to go with “Using Multiples Pages” approach or some better new approach than that.
Anyway, we will be using “Multiples Pages and their content” approach when building the About Us page of our Dosth site.
By the time you are done with this course, you’ll be mastering both the techniques.
In the next lesson, we will start building the important content of the Homepage using the Gutenberg Editor.