Key Features of WordPress 6.7: What's New and Improved
Hey everyone! Today, we’ll talk about some of the exciting new features in WordPress 6.7. There are a few game-changers that are going to make your development work easier, smoother, and more efficient. Let’s break it down:
1. Post Editor Iframing with Meta Boxes
WordPress 6.7 brings iframe support to the post editor, which means the post content and editor UI are now isolated from each other. This solves a big issue: it makes it easier to reuse styles across the editor and the front-end, ensuring your theme looks the same in both places.
Previously, having meta boxes in the editor blocked this feature, but now, WordPress allows for a split view. You can see both the post content and meta boxes at the same time, which makes it much easier to work on your content while interacting with the meta boxes.
2. Block Bindings in the Editor
For developers working with blocks, WordPress 6.7 improves how blocks handle data. With block bindings, attributes are automatically connected to their data sources, making the whole process more dynamic and responsive. Essentially, blocks now adapt better to changes, leading to smoother development and a better user experience.
Here’s a simple example:
import { useBlockProps } from '@wordpress/block-editor';
const MyBlock = () => { const blockProps = useBlockProps(); return <div {...blockProps}>Hello, WordPress 6.7!</div>; };
This makes it easier to create and manage blocks, and ensures everything stays in sync.
3. Handling Overflow in Meta Boxes
If you’ve added meta boxes to the post editor, you need to be aware of a small change: meta boxes now clip overflowing content. This means things like dropdown menus or popovers might get cut off if they extend upwards.
But don’t worry—there’s a simple fix: you can render these menus outside the meta box container, and it will prevent the clipping. For example, WordPress components like Popover and DropdownMenu already handle this well:
import { Popover } from '@wordpress/components';
const MyPopover = () => ( <Popover position="top center"> <p>Popover content here</p> </Popover> );
This ensures everything stays visible and functional!
4. Rich Text UI and Anchoring
For plugins that include rich text editing, WordPress now offers the useAnchor hook to help position your UI elements correctly. If you're working with custom text editors or rich text, using this hook ensures your UI stays anchored to the right text, even when using the iframe.
Here’s how it works:
Recommended by LinkedIn
import { useAnchor } from '@wordpress/rich-text';
const RichTextWithAnchor = () => { const anchorProps = useAnchor(); return <p {...anchorProps}>Anchor this text</p>; };
This ensures that everything stays in place and behaves as expected, even in the iframe view.
5. Iframe Limitations
While iframes offer some great benefits, there’s one condition where they might not work: if the block you’re using has an API version lower than 3. For most cases, though, iframes will work just fine, and if you’re using a block-based theme and the Gutenberg plugin, this limitation is bypassed.
6. Split View for Meta Boxes
The split view is one of the coolest new features in 6.7. It allows you to see both the editor content and the meta boxes at the same time. This change helps ensure that when you're editing a post, you can reference any part of the post while interacting with the meta boxes, creating a more efficient and smooth editing experience.
Final Thoughts for Developers
If you're adding meta boxes or custom rich text features, make sure to:
By taking these steps, you'll ensure your plugins and themes work seamlessly with the new changes in WordPress 6.7.
In Summary: WordPress 6.7 is packed with updates that make block editing smoother, ensure better styling consistency, and give you more control over how your editor behaves. Whether you're managing meta boxes, improving block interactions, or working with rich text, these updates make the WordPress experience much easier and more flexible.
Resources:
For more detailed documentation and new functionalities, please refer to the following resource links below.