Best approach to create sites with Modular Content? [closed]

I’m learning how to create WordPress sites and custom structures, like themes and plugins from scratch, but there are some concepts that remain obscure to me.

I would like to create websites with dynamic and modular content. Specifically, I want to have several sections in my home page, and use them as content blocks, giving me the capability to place them in whatever order I want and modify their content without affecting the others.

I’ve seen this in several themes, with different approaches. Some of them, use widget areas for each section. I think other sites make use of custom post type or plugins like ACF to do something similar.

What do you think it’s the best approach in this case?
Its important to note that the options to modify the content should remain fairly simple, as the site will be owned and administered by people who are new to WordPress. I imagine a plugin that appears in the Admin Content Panel and takes the user to a section manager page where he can see, and modify the content and order for each section created.

Thanks in advance for your time and answers.

1 Answer
1

There are many solutions.

My favorite is ACF with its Flexible Content field.

ACF with Flexible Content

ACF is pretty useful plugin and I use it on most of my sites. So when it comes to modular content, it’s pretty easy for me to use it also (so I don’t need to install any other plugins and the experience of editing all site is more consistent.

It allows you to define custom blocks/sections and define custom and semantic editor forms for them. You can export such defined sections to PHP code and include it with your theme/plugin, so it’s more stable and user won’t mess it up.

Another advantage of this solution is that you have full control over HTML code it generates.

The only flaw is that you have to write that code 😉

Widgets/Siedebars

I’ve seen such use of sidebars on some sites. It’s not so bad and you don’t need any thirdparty code to make it work.

There are two major problems with this solution though IMHO:

  • you’ll have to implement your own widget for every section, and it can be a lot of work, if editor form for given widget is complex,

  • user can easily mess it up by using thirdparty widgets, that won’t be styled for such use.

Page Builders

This is one of most popular solutions, I guess. There are many page builders on the market and it’s the easiest solution, but…

I really hate it. The more flexible given builder is, the more complex it gets. So we end up with some gargantuan code with tons of features that will freeze your browser whenever you’ll try to edit some page.

There are many flaws of page builders use

  • they’re not so flexible and most of the time it’s a lot of work to implement custom editor forms and sections,

  • they’re pretty slow,

  • the HTML generated by them has very poor quality and it’s not semantic,

  • they can easily break your content (a lot of shortcodes, storing additional custom fields, and so on).

Gutenberg

Of course we can’t forget the new kid on the block – Gutenberg. Although I won’t write much about it – it’s rather fresh and there still are big changes in it, so it’s hard to say how will it look in the end and what will it be capable of.

The main advantage although is that it will be default editor, so…

Other solutions

There are many other solutions, I guess. So far I’ve seen:

  • custom page template that will display subpages of this page as sections,

  • page template that will generate its content based on some menu,

  • custom editors,

  • and so on.

But these solutions are pretty rare and I don’t think they’re worth mentioning…

Leave a Comment