Are you using post formats? Now there’s a block for that! WordPress’ post formats feature was introduced in version 3.1 as a way for themes to customize presentation of a post. It allows users to choose the way a post looks by selecting a post format from a dropdown list. WordPress has a fixed list of post formats available but not all themes support them.

Post formats have maintained a smaller cult following. While I don’t see them making a major comeback, many users who committed to using them long ago would like to continue.

WordPress Core Committer Aaron Jorbin has created a plugin called Post Format Block that will display a post format in a block-based theme. His writeup dives deeper into the technical details of how he created the plugin. The block allows users to change the color, font size and weight of the displayed post format.

post-format-block New Block Plugin Displays Post Formats design tips post-format-block New Block Plugin Displays Post Formats design tips Post Format Block plugin

Jorbin said he built the plugin to display post formats on his personal site and wanted to help others do the same.

“As someone that benefits greatly from Open Source, I view it as my responsibility to give back and it wasn’t much effort to build it in a way that it could be open from the start,” Jorbin said. “Plus it gave me a chance to play with codespaces and explore some parts of Gutenberg I wasn’t as familiar with.”

Are post formats relevant in the new frontier of blocks, where users have more control over the presentation of posts than ever before? They may not have a strong future in WordPress moving forward, but thanks to the plugin system, people can keep using them while using a block-based theme.

“I think Post Formats are in a weird position since looking back with hind sight, I don’t think they should have been a part of core,” Jorbin said. “But for now, they remain in core and they are useful for me in this instance. I like them since for my personal site, they make sense. But I don’t think they make sense on a lot of sites.”

If you are using post formats and you want to be able to keep using them with a block-based theme, this plugin will give you that continuity. You will want to search for it using the name of it in quotes. (Otherwise you will be scrolling a long time to try to find it.) Post Format Block is available for free in the WordPress plugin directory but it requires some code that isn’t in WordPress 5.8 to work. You will have to use the nightly build until 5.9 is released. The plugin is also available on GitHub for contribution or testing with Codespaces.

Like this:

Like Loading…



Source