Skip to content

Disables anchor support for the More block.#74267

Merged
shimotmk merged 1 commit intotrunkfrom
disable-anchor/more
Dec 30, 2025
Merged

Disables anchor support for the More block.#74267
shimotmk merged 1 commit intotrunkfrom
disable-anchor/more

Conversation

@shimotmk
Copy link
Copy Markdown
Contributor

What?

related #74103

The More block lacks a block wrapper, so adding an HTML anchor won't assign an ID.

<RawHTML>
{ [ moreTag, noTeaserTag ].filter( Boolean ).join( '\n' ) }
</RawHTML>

Instead, it adds id="more-' . $_post->ID . '".

https://github.com/WordPress/wordpress-develop/blob/7c7e521e36a451a4d73238706a18976b98cd4009/src/wp-includes/post-template.php#L364

Therefore, anchor support is disabled.

Why?

How?

Testing Instructions

  1. Open a post or page.
  2. Insert a more block.
  3. It is understood that anchors cannot be set.

Testing Instructions for Keyboard

Screenshots or screencast

Before After
before after

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

Labels

[Block] More Affects the More Block - used for displaying the 'Read More' link [Feature] Block API API that allows to express the block paradigm. [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants