Editorial Blocks

Description

Editorial Blocks adds magazine blocks and news blocks to the WordPress block editor: a post grid, a post list, a featured post group, a hero post and an author list. They are the layouts a blog, magazine, newspaper or news site needs on its homepage, category pages and landing pages.

See example website — the Evermag demo homepage is built with these blocks.

The plugin adds blocks and nothing else. There is no settings page, no dashboard widget and no onboarding wizard — you add a block, set it up in the sidebar like any core block, and you are done.

Why not just use the Query Loop block?

WordPress already ships the Query Loop block, and it is a good tool for building a post layout from parts: a Post Template, a Post Title, a Post Featured Image, a Post Date, then columns, groups and spacing, assembled by hand. Editorial Blocks is for when you would rather not build at all.

  • Advanced magazine layouts, ready-made. A lead story with a rail of headlines beside it, the classic three-column newspaper homepage, a hero with the headline over the image, a post list that turns into cards on a phone. With Query Loop these take several nested blocks, two queries and an offset — here each one is a single block.
  • Choose, don’t build. You pick the layout, the column count and the posts from the sidebar. There is no post template to assemble and nothing to nest.
  • Stable, fixed layouts. The structure belongs to the block, so it cannot be pulled apart by an accidental drag in the editor, and the same block looks the same on every page you put it on.
  • Responsive out of the box. Separate column counts for desktop, tablet and phone, and thumbnails that give way before headlines do, so a title is never squeezed into a column of single words.
  • Already styled. Bylines with author avatars, dates, categories, comment counts, image ratios, title sizes and section headings are done for you — while fonts, colours and heading sizes still come from your theme.

Blocks

  • Post Grid — posts as a grid of cards, with a column count each for desktop, tablet and phone.
  • Post List — posts as a list of rows, each with a thumbnail beside the text, or as stacked cards on a phone.
  • Post Group — a featured cluster: one lead story with the rest of the posts beside it, either as a single rail or as the classic three-column homepage layout with the lead left, centre or right.
  • Hero — one story, shown large, with the image above the text, beside it, or behind it.
  • Authors — a grid of author cards, each with an avatar, bio and latest post.

Choosing the posts

Every block picks its posts the same way: by number, category, tag, author, or an explicit list of post IDs — and each of those can be excluded as well as included. Post Group and Hero can also take their lead story from somewhere else entirely, such as your sticky post or the newest post in one category, and the block will make sure that story does not then repeat further down.

Section headings

Every block can carry a heading above it — “Latest news”, with a “See all” link beside it — set in the block’s Heading panel. Leave the text blank, which is how a block starts, and no heading is shown at all. The heading can be aligned left, centre or right, and can have a rule above it, below it, or running along beside the words.

Post titles

Post Grid and Post List let you set how big a card title is — small, medium, large or huge — and, separately, which heading level it prints as. They are two different questions: the size is how the title looks, the heading level is where it sits in the page’s outline. So a small title can still be an h2. Leave the size on Default and the title keeps whatever size your theme gives that heading.

Notes

Blocks render on the server, so a block always reflects your posts as they are right now — editing or publishing a post updates every block that shows it, with nothing to re-save. It is also the same code that draws the editor preview, so what you see while editing is what the page will show.

The blocks come laid out and styled, but inherit fonts, colours and heading sizes from your theme, so they look native rather than bolted on.

Credits

The comment icon is “message-circle” from Feather by Cole Bemis, used under the MIT licence.

Recommended Theme

The blocks work with any theme. They lay themselves out and inherit fonts, colours and heading sizes from whatever theme you run, so there is nothing to match up and no theme you have to switch to.

They were built and tested against our own themes, all free on WordPress.org:

Blocks

This plugin provides 5 blocks.

  • Post List A configurable list of posts, mirroring the archive entry.
  • Authors A grid of author cards: avatar, name, bio, and optional latest post.
  • Post Grid A configurable grid of post cards with responsive columns.
  • Post Group A featured cluster: one lead story, with the rest of the posts beside it.
  • Hero One big lead story, in a big (stacked/overlay) or split layout.

Installation

  1. Upload the plugin through Plugins Add New Upload Plugin, or install it from the WordPress.org plugin directory.
  2. Activate it.
  3. In the editor, add a block and search for Post Grid, Post List, Post Group, Hero or Authors.

There is no configuration step.

FAQ

Does this work with any theme?

Yes. The blocks bring the styling they need and define no colours or sizes of their own globally, so they cannot clash with your theme. If your theme sets the CSS variables the blocks look for, they follow it automatically.

Does it work in the site editor?

Yes. The blocks work anywhere the block editor does, including templates and template parts in a block theme.

Will it slow my site down?

It shouldn’t. There are no page builder libraries, no jQuery and no front-end JavaScript — a block is plain HTML and a small stylesheet, and a block’s stylesheet is only sent to a page that actually uses it.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Editorial Blocks” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Editorial Blocks” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.2.0

  • Post List: a Spacing setting in the Layout panel — none, tiny, small, normal, large or huge — for the space between one story and the next. Existing lists stay on Normal, the spacing they have always had.
  • Post List: a Vertical align setting — top, middle or bottom — for how the picture and the text sit against each other when one is taller. Middle is the default, as before.
  • Post List: Grid on mobile. Turn it on and, on a phone, each row becomes a card with the picture above the headline, across the full width. Off by default.
  • Post List: on a narrow row the thumbnail now gives way before the text does, so a headline is never squeezed into a column of single words.
  • Post Grid: a Spacing setting in the Layout panel — none, tiny, small, normal, large or huge — for the space between the cards, across and down. Existing grids stay on Normal.
  • Post Grid, Post List, Hero and Post Group: an Author avatar toggle, which puts the author’s picture in front of the byline. A site with avatars switched off in Settings Discussion keeps a text-only byline.
  • Hero and the Post Group lead story now show the author, with the avatar, by default. This includes blocks you have already placed; switch Author off in the block’s settings to go back.
  • Hero and the Post Group lead story print the featured image’s caption under the picture, when the image has one — the place for a photo credit.
  • Post Group, list stories: the thumbnail can now be sized (from the small 60px square up to 200px or 40% of the row) and cropped to any of the shared shapes, and the story title given one of the four named sizes. Blocks you have already placed keep the small square and the same title size.
  • Post Group: the “1/2 + 1/2 — even” layout is now genuinely even. A long headline or a wide image could push its column past its half; the columns now hold their ratio whatever is inside them, as do the other layouts.
  • Authors: authors with the same number of posts are now listed by name, so their order is predictable.
  • Tested up to WordPress 7.1.2.

1.1.1

  • Post Grid and Post List: the title size can now be left on Default, which prints no size of the plugin’s own and leaves the title at whatever size your theme gives that heading level. The four named sizes are unchanged, and blocks you have already placed keep the size they were set to.

1.1.0

  • Every block can now carry a section heading above it — the words, an optional “See all” link beside them, left/centre/right alignment, and a rule above, below or running alongside. Blank by default, so nothing changes until you fill it in.
  • Post Grid and Post List: choose the size of a card title (small, medium, large or huge) and its heading level (h2, h3 or h4) separately, so the way a title looks no longer decides where it sits in the page outline.
  • The version used to cache-bust the plugin’s CSS and JS is now read from the plugin header instead of being typed a second time, so an update can no longer ship new styles that a browser keeps serving from its cache.

1.0.0

  • Initial release.
  • Five blocks: Post Grid, Post List, Post Group, Hero and Authors.
  • Every block picks its posts by number, category, tag, author or an explicit list of post IDs, and each of those can be excluded as well as included.
  • Post Group and Hero can take their lead story from somewhere else — a sticky post, or the newest post in one category — without it repeating further down.
  • An optional comment count on a post card, off by default, hidden on a post that has no comments.