This question already has answers here: Gutenberg change/remove "Write your story" placeholder in custom blocks (2 answers) Closed 2 years ago.admin管理员组文章数量:1197761
I'd like to remove the placeholder in an empty block 'type / to choose a block'.
I often have empty spaces in my drafts as I'm writing and this placeholder clutters everything. I'd just like it empty. Is there a way to remove it with a filter?
This question already has answers here: Gutenberg change/remove "Write your story" placeholder in custom blocks (2 answers) Closed 2 years ago.I'd like to remove the placeholder in an empty block 'type / to choose a block'.
I often have empty spaces in my drafts as I'm writing and this placeholder clutters everything. I'd just like it empty. Is there a way to remove it with a filter?
Share Improve this question asked May 30, 2022 at 23:49 RossRoss 1193 bronze badges 2- 2 Looks like this has been asked before here: Gutenberg change/remove "Write your story" placeholder in custom blocks – birgire Commented May 31, 2022 at 17:08
- No, these are 2 separate questions. The "Write your story" placeholder shows in a new post when no blocks have been added. The solutions for that question do not solve my problem. My question above is the place holder in a paragraph block when there is no text. – Ross Commented Jun 7, 2022 at 23:25
1 Answer
Reset to default 2add_filter( 'write_your_story', function ( $string, $post ){ return ' '; }, 10,2);
Also answered at: https://wordpress.org/support/topic/remove-type-to-choose-a-block-block-placeholder/
Docs: https://developer.wordpress.org/reference/hooks/write_your_story/
本文标签: Remove 39typeto choose a block39 placeholder
版权声明:本文标题:Remove 'typeto choose a block' placeholder 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738562165a2099445.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论