Move to Header Block lets you flag any block in a post so it shows up somewhere else on the page, like moving a recipe summary up into your header. Flag the blocks in your post, place the Move to Header block once in your template, and the plugin does the moving on the front end.
Before you start
- WordPress 6.5 or later
- PHP 5.6 or later
Install
- In your WordPress dashboard, go to Plugins → Add New Plugin.
- Click Upload Plugin.
- Choose the plugin zip file.
- Click Install Now.
- Click Activate.
How to use
Flag a block to move
- Open a post in the block editor and select the block you want to move.
- In the block sidebar, open the Advanced panel.
- Turn on Move to header. The help text reads “This block will be hooked into the header and removed from the content on the frontend.”
- Save or update the post.
You can flag as many blocks as you like, including blocks nested inside groups or columns. They all move, in the order they appear in the post.
The toggle works by adding the class move-to-header to the block’s Additional CSS class(es) field, so you’ll see it there too. Blocks that don’t offer that field don’t get the toggle.
Place the Move to Header block
- Open the template or template part where the flagged content should appear. For example, your header template part in the Site Editor. You can also place it inside the post content itself.
- Add the Move to Header block. It’s in the Widgets category, or search for “move” or “header”.
- Save.
In the editor, the block shows a placeholder that says “All the content hooked into the header will be displayed here. There is nothing to display in the editor.” That’s expected. The moved content only appears on the front end.
What happens on the front end
- Every flagged block is removed from the post content.
- Those blocks show up where you placed the Move to Header block instead.
- In the editor, nothing moves. Flagged blocks stay where they are so you can keep editing them normally.
Developer reference
Coming soon: the hooks, filters and functions you can use with this plugin from your theme or a code snippet.
FAQs
Nothing is flagged on a post. What does the block show?
If WP Recipe Maker is active and the post has a recipe, the block shows that recipe’s summary. Otherwise it shows nothing.
Does turning on “Move to header” change how the block looks in the editor?
No. It only adds the move-to-header class. The block still edits normally in place.