Description
openedon Jun 4, 2024
To my knowledge it's not currently possible to build a section like this (from this site) in a block theme:
You can get tantalisingly close using the following structure and setting the Cover block to Use featured image and giving it a gradient overlay.
Query Loop
Post Template
Cover
Title
Excerpt
The problem is that you can't make the Cover block link to the post.
It would be great if there were a way to achieve this. I'm not sure of the best solution, but two ideas:
-
A general purpose Link block which wraps its contents with an
<a>
and so allows you to turn anything into a link. This could even replace the existing Link to post and Link to home settings that exists in the Post Featured Image, Post Title, and Site Title blocks. We would need a way to restrict the user from nesting<a>
tags though as this is invalid markup. -
Add a new Link block supports that shows up as a panel in the block inspector and add it to lots of different blocks: Cover, Group, Image, etc.
Metadata
Assignees
Labels
Type
Projects
Status
Next