Skip to content

List Block: Add support for core/image and core/gallery inner blocks to List Item Block#71138

Open
im3dabasia wants to merge 1 commit intoWordPress:trunkfrom
im3dabasia:try/add-image-inner-blocks-to-list
Open

List Block: Add support for core/image and core/gallery inner blocks to List Item Block#71138
im3dabasia wants to merge 1 commit intoWordPress:trunkfrom
im3dabasia:try/add-image-inner-blocks-to-list

Conversation

@im3dabasia
Copy link
Copy Markdown
Contributor

What?

Closes #17999
Related issue: #38251

Extends the List block to allow Image and Gallery blocks inside List Items by updating the innerBlocks configuration. See suggestion here

A better solution might be allowing other blocks to be added to the list? #17999

Why?

Users frequently need to add visual content within list items but currently lack this functionality. This enhancement provides the flexibility to create richer, more engaging list content by embedding images and galleries directly within list items.

How?

  • Modified the List Item block's innerBlocks allowedBlocks to include core/image and core/gallery
  • Updated block configuration to support nested media blocks within list structure
  • Maintains proper semantic HTML structure (ol/ul with li elements) for accessibility and SEO

Screencast

Screen.Recording.2025-08-08.at.4.52.43.PM.mov

@im3dabasia im3dabasia changed the title feat: Add support for image and gallery inner blocks to list block [List Item Block]: Add support for core/image and core/gallery inner blocks to List Item Block Aug 8, 2025
@im3dabasia im3dabasia marked this pull request as ready for review August 11, 2025 03:45
@github-actions
Copy link
Copy Markdown

github-actions bot commented Aug 11, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @zkingdesign.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: zkingdesign.

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: paaljoachim <paaljoachim@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@im3dabasia im3dabasia added [Type] Enhancement A suggestion for improvement. [Block] List Affects the List Block labels Aug 11, 2025
@im3dabasia im3dabasia changed the title [List Item Block]: Add support for core/image and core/gallery inner blocks to List Item Block List Block: Add support for core/image and core/gallery inner blocks to List Item Block Aug 11, 2025
@Mamaduka
Copy link
Copy Markdown
Member

I don't think this resolves the linked issue. It requests an option for adding other blocks, not just Image and Gallery.

Before we move forward, it could be a good time to check why the current allowedBlocks limitation was set in place. Were there any blockers at the time? Are they resolved now? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] List Affects the List Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List block - possibility to add other blocks

2 participants