Skip to content

Keyed post content #41073

Closed as duplicate
Closed as duplicate

Description

@carlomanf

This is a request for a new "key" attribute for the Post Content block, which would enable posts to have multiple post content instances identified by keys.

This issue supersedes #29173, which proposed it as a separate block rather than an attribute.

What problem does this address?

The main problem solved by this new attribute is that a post can only have one post content, but one post content may not always be sufficient.

Themes have often supported "multi-panel" content on front pages but there hasn't been a standardised way to do it. A good example diagram is available for the Pique Theme, which accomplished it in a pre-blocks environment using the customiser and extra pages. Some other themes, such as StudioPress themes, used widget areas.

This new block attribute could be a standardised way for themes to build these kinds of front pages, as well as post type templates.

What is your proposed solution?

The user would interact with a keyed post content block similarly to the un-keyed post content block, with the key being used to store the inner blocks in the postmeta table rather than in the post_content column. A prefix would be used to avoid collisions with existing postmeta keys. This would effectively let each post have multiple post content instances identified by keys. It could look something like this:

<!-- wp:post-content {"key":"sidebar"} /-->

A keyed post content block could be used in a post type template, a front page template or within a query loop. If it's used in the post type template or front page template, its content can be edited using the template mode in the post editor.

Activity

  1. added
    Needs Technical Feedback
    on May 14, 2022
  2. added
    [Type] Enhancement
    on Sep 12, 2023
  3. added
    [Block] Post Content
    on Apr 13, 2024
  4. talldan commented on Dec 19, 2025

    @talldan
    Contributor

    Found this issue doing some triage. I saw it was already mentioned on #61225, the idea of using a binding for innerBlocks could be a possible way to solve this.

    I think there's some general agreement that all the Post Title, Post Featured Image, Post Content blocks are things that could eventually be replaced by bindings, though it may be a while before that's a reality.

    Not sure if this issue would be considered a duplicate. I'll leave that decision up to the reporter.

    I'll remove the 'Needs technical feedback' label, as I think the technical aspects were well explained, the main idea is to display blocks that aren't stored in post content, but instead somewhere else.

  5. removed
    Needs Technical Feedback
    on Dec 19, 2025
  6. carlomanf commented on Dec 21, 2025

    @carlomanf
    Author

    I left this open for a while as the scope of #61225 seemed unconfirmed and whether this would be covered, but I see now you have updated the title and description of that issue so I will go ahead and close this.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Post Content[Type] Enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions