Skip to content

Instantly share code, notes, and snippets.

@CapWebSolutions
Created October 14, 2025 21:11
Show Gist options
  • Save CapWebSolutions/0fcd45c77127cc9ee361a0e06aa87150 to your computer and use it in GitHub Desktop.
Save CapWebSolutions/0fcd45c77127cc9ee361a0e06aa87150 to your computer and use it in GitHub Desktop.
Display reusable blocks in WP backend
/**
* Reusable Blocks accessible in backend
* @link https://www.billerickson.net/reusable-blocks-accessible-in-wordpress-admin-area
*
*/
function mrco_reusable_blocks_admin_menu() {
// Add under Appearence nav.
add_submenu_page( 'themes.php', 'Reusable Blocks', 'Reusable Blocks', 'edit_posts', 'edit.php?post_type=wp_block', '' );
// Remove it if still exists at top level.
remove_menu_page( 'edit.php?post_type=wp_block' );
}
add_action( 'admin_menu', 'mrco_reusable_blocks_admin_menu' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment