TransWikia.com

How do you approach block structured content?

WordPress Development Asked by Kevin All on November 23, 2021

I’m currently trying to learn how to create a custom wordpress themes and while the documentation is pretty great there seems to be a lot ways to implement things on your website.

What I’m struggling with is that I already have a static website which I’m trying to convert over to WordPress so that you can add/change content. The content itself is structured in a block/container way, sort of how websites like these have their content shown. http://collective.kubistudio.com/v4/

Basically different containers having different block patterns where those blocks have text/images.

I’ve looked around the WordPress documentation and there’s everything from using Gutenberg to custom field types, wordpress customizer, etc. A lot of options which are all pretty cool but also confusing to know which one to pick.

I’d imagine Gutenberg blocks would be more suitable for what I’m going for since having different Gutenberg blocks each representing the content in a different way would be easier and faster to implement.

Any ideas on what to use?

One Answer

It really depends on your specific use case.

how you're structuring your data to begin with, how much content do you have for the site (is it 10 pages or hundreds?); will the same content or information be used in multiple places on the website, how do you plan to update it (are you expecting to integrate 3rd party APIs into it or just have end users manually update it?), or is very dynamic, like an e-commerce site? and what languages (PHP or JS) are you more comfortable with..

If you're looking to build something like the example that you provided, with maybe a dozen or 2 pages, less than 100 images) that won't be replaced very often, custom fields although extremely useful, are likely over-engineered for your use case.

If you're making a custom theme for someone as of now, you'll probably use a combination using blocks for the "post content" and then the traditional methods (the customizer, etc) and php templates for the layout (the heading, any sidebars, footers, etc).

Lastly, there is a big transition of how themes are being made in Gutenberg with the full-site editing initiative going on (and is not quite ready yet for the public), just keep that in the back of your mind, depending on how much on the 'cutting-edge' that you want to be and how much your comfort and experience with react and javascript is.

PS: For anyone reading this, the recommend advice here (July 2020) will be possibly outdated in just a few months depending on how the greater development and adaption of Gutenberg and full-site editing by the WordPress community.

Answered by Will on November 23, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP