Skip to content

Post formats: Archive templates have no description and use the slug instead of a readable name #65319

@carolinan

Description

@carolinan

Description

When a block theme includes the HTML file for a post format archive, the Site Editor and Data Views shows the template without a description and without a human-readable name. Instead it uses the slug, name from the HTML file.

It is as if the Data Views do not recognise that the template is part of the template hierachy.

Step-by-step reproduction instructions

First, you need a block theme, and you need to enable post format support on the active theme.

Example:

function twentytwentyfour_setup(){
	add_theme_support( 'post-formats', array( 'standard', 'aside', 'gallery', 'audio', 'video', 'link', 'image', 'chat', 'status', 'quote' ) );
}

add_action( 'after_setup_theme', 'twentytwentyfour_setup' );

Next, add a post format archive template inside the templates folder.
The content of the file does not matter for this test. I have used the link post format as example:
templates/taxonomy-post_format-post-format-link.html

Optionally, create one or more posts with the link post format assigned.

Go to Appearance > Editor > Templates.
Note that the link archive is available, but uses the whole slug as the template name.

Screenshots, screen recording, code snippet

The link post format archive template on the Template screen, showing the partial file name for the template.

Environment info

WordPress 6.6.2, with and without Gutenberg trunk.

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Metadata

Metadata

Assignees

Labels

[Package] DataViews/packages/dataviews[Type] BugAn existing feature does not function as intended[Type] WP Core TicketRequires an upstream change from WordPress. Core Trac ticket should be linked.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions