Limit where the more block can be inserted #61128
Labels
[Block] More
Affects the More Block - used for displaying the 'Read More' link
[Type] Discussion
For issues that are high-level and not yet ready to implement.
Description
The more block is the block version of the
<!--more
tag and if I understand correctly it only works if it is placed in the block editor, in the post or page content.Code reference
Codex
Here are some examples of how themes in the theme directory use the more tag:
https://wpdirectory.net/search/01HWCBQ0RDFYTFCV7PHDB6X9K9
It seems to be exclusively used for custom excerpt functionality.
I feel that the open issues for the more block and the read more block shows that these blocks are easily mistaken for the other, and I wonder if this block should be limited to the block editor/pattern editor and not be placeable in templates.
It would reduce (but not completely remove) the risk that the more block is added in a query loop where it does not do anything.
Is there any other way to prevent it from being added inside a query?
Step-by-step reproduction instructions
If you wish to test if the block does anything in a template, just add it to any template and view the front.
If you wish to test how it works, then add the more block to a post, add some content before and after it, and set the query loop to display the post content. It does not work with the post excerpt.
Screenshots, screen recording, code snippet
Environment info
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
The text was updated successfully, but these errors were encountered: