Before WP 5.9 it was possible to get rid of some heading types with CSS like this:
.block-library-heading-level-toolbar .components-toolbar-group {
button:nth-child(1), button:nth-child(5), button:nth-child(6) {
display: none;
}
}
Since WP 5.9 the HTML code has changed. Now you can hide H1, H5 and H6 like this:
[aria-label="Heading 1"], [aria-label="Heading 5"], [aria-label="Heading 6"] {
display: none;
}
Related Posts:
- Are there ways to make the Gutenberg editor wider? And the HTML-block higher?
- How to remove specific panels in the editor (Gutenberg) when editing a block (via right panel)?
- How to Disable auto id attributes in Heading tag?
- How `window.wp.oldEditor` is being set in the editor?
- Notion-like editing and layout with a convenient freeform collaborative editor in WordPress? [closed]
- How to Batch Convert Gutenberg post to Classic post?
- Gutenberg dynamic block render_callback gives null for $post
- Layout Settings in the new Gutenberg editor
- How do I reinstate the “Add Block” feature that changes with the update?
- How can I reset/remove background colour from a block
- how to display gutenberg editor in a view
- How can i extend the existing Block Inspector Tabs in WordPress Gutenberg Editor?
- Embeds (YouTube, Spotify) Work Live but Won’t Load in Block Editor [closed]
- Remove block styles in the Block Editor
- Blocks: set a default value for a TextControl
- Extending Gutenberg group block: How to properly combine multiple attributes?
- Required (mandatory) Gutenberg block
- Add classname to Gutenberg block wrapper in the editor?
- Help with using getBlockIndex
- Best practices for CPT without using an editor [closed]
- Gutenberg – Custom blocks onClick not working?
- Get blocks from other pages, from within current page
- WordPress Rest API only returns content when posttype has editor capability
- Add a button to the toolbar of an existing Gutenberg block
- JSON File in Gutenberg
- Show date post published in Gutenberg component
- Adding an html wrapper to a custom Block Pattern
- How to add a class to the element in a custom Gutenberg block
- Gutenberg: How to check if a block is used in a paginated post?
- Editor API Endpoint or Data Store That Provides a List of Meta Fields for Post Types
- Specify exact parent child relationship between two blocks
- Using custom Entities to retrieve external data in the Block Editor
- How can I remove a button from the paragraph block toolbar?
- Align Group blocks left or right
- Unable to override MediaPlaceholder component
- Run the edit function of parent block when something changes in InnerBlocks
- do_blocks does not include its CSS
- Track Block Pattern Insertion Within the Block Editor
- block variations registration in PHP
- How to add screen reader text to links inserted in the block editor?
- Auto synchronize saving of custom block editor entities
- Store data from nested block of gutenberg
- Output content of post excerpt into Innerblocks within Gutenberg block
- How to add a link in a translation in gutenberg
- component does not render in block save
- Adding block programmatically to InnerBlocks
- How do I access onMerge, onReplace, onRemove functions for a Rich Text component in Gutenberg block code?
- How can Reusable Blocks be fully deleted?
- Make a Gutenberg Block that do WP_User_Query
- Extend Gutenberg block core/quote block
- How to get all attributes of a block in PHP?
- reload the gutenberg editer on taxonomy change
- Gutenberg Block Get Author Details
- Is it possible (safe) to create custom blocks using ES Next format?
- How do i get the link to a block?
- How to prevent Block Editor from adding id to block markup in save function?
- Dequeue Gutenburg Block Library CSS (‘wp-block-library’) in Admin
- How do I make sure the gutenberg block CSS is not disrupted by generic styles?
- Custom block Block Validation failure w/ deprecation declared
- Working with external library in gutenberg block
- Using full site editing, can I edit just one specific post / page to be unique?
- Detect selected block pattern from a specific Pattern category
- How to add a message when post category is empty (the category have no published posts)?
- Add javascript file to a block pattern
- Block editor not recognizing markdown
- Can’t add front end script file using block.json for a custom block
- How to create Gutenberg patterns and patterns categories based on CPT posts and CPT terms?
- Gutenberg Block: Query for posts with blocks and sort by attributes
- How to Disable “Block Recovery” for HTML Blocks in Gutenberg
- Block error: post_taxs_obj is not a valid property of Object
- How to get the Gutenberg image block to show new Media Library listing
- useSelect in event callback – not retrieving value on time
- Can anyone explain why setting a block attributes source to a data-attribute doesn’t work?
- How to: Provide component with innerBlocks to WordPress Gutenberg’s save function?
- How can I display instagram block with parse_block?
- Do not wrap custom block in an additional DIV but instead use only the JSX I provide
- Can’t extend my custom gutenberg block
- Is there an easy way to remove the data-preserver-spaces span from blocks?
- How to Stop Gutenberg From Adding Classic Block
- How to increase width of code block in WordPress blog?
- Why does Gutenberg adds 4 around blocks? And how to change this?
- Have parent block’s isSelected be true if an innerblock is selected?
- How can I add the option to format to list in RichTextToolbarButton?
- How to get blocks with same heigh in columns?
- Gutenberg: Issue trying to commit locally
- Get postId in a wordpress pattern file?
- Remove placeholder from core/image in InnerBlocks template
- Gutenberg block not displaying prop values
- Adding custom link text to a URLInputButton
- Rearrange order of block into a block category gutenberg
- Gutenberg Block Deprecation – Handling old viewScript and styles
- Resaving posts to update static blocks
- How to dynamically add style tags to Gutenberg editor in react
- When to use the second parameter to useSelect?
- How to set autoload from “yes” to “no” _transient_wp_core_block_css_files
- Consistent inline styling in a Gutenberg-paragraph-block
- Add additional scripts and markup in the section of default Gutenberg theme
- Responsive rules with block themes and theme.json
- WordPress 6.4 – How to select a different menu I have created?
- Prevent block variation inside certain parent blocks