Skip to content

Instantly share code, notes, and snippets.

@getdave
Created January 28, 2026 16:13
Show Gist options
  • Select an option

  • Save getdave/dcaf203c16e7362a2e00f85b04e67404 to your computer and use it in GitHub Desktop.

Select an option

Save getdave/dcaf203c16e7362a2e00f85b04e67404 to your computer and use it in GitHub Desktop.
Navigation Block Test with Nested Items
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Navigation Block with Hash Links & Customizable Overlays Experiment",
"description": "Testing Navigation Block with Hash Links with Gutenberg Customizable Navigation Overlays experiment enabled",
"author": "automattic"
},
"landingPage": "/wp-admin/site-editor.php?canvas=edit",
"preferredVersions": {
"php": "latest",
"wp": "latest"
},
"features": {
"networking": true
},
"login": true,
"steps": [
{
"step": "runPHP",
"code": "<?php\nrequire '/wordpress/wp-load.php';\n$experiments = get_option( 'gutenberg-experiments', array() );\n$experiments['gutenberg-customizable-navigation-overlays'] = true;\nupdate_option( 'gutenberg-experiments', $experiments );\n"
},
{
"step": "writeFile",
"path": "/wordpress/wp-content/mu-plugins/rewrite.php",
"data": "<?php /* Use pretty permalinks */ add_action( 'after_setup_theme', function() { global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); } );"
},
{
"step": "importWxr",
"file": {
"resource": "url",
"url": "https://gist.githubusercontent.com/getdave/e84eac020209dd575a3ff7c1b655636b/raw/"
}
},
{
"step": "runPHP",
"code": "<?php\nrequire '/wordpress/wp-load.php';\n\n$post_content = '<!-- wp:navigation-link {\"label\":\"Home\",\"url\":\"/\",\"kind\":\"custom\"} /--><!-- wp:navigation-link {\"label\":\"About\",\"url\":\"/about\",\"kind\":\"custom\"} /--><!-- wp:navigation-link {\"label\":\"Projects\",\"url\":\"/projects\",\"kind\":\"custom\"} --><!-- wp:navigation-link {\"label\":\"Project 1\",\"url\":\"/projects/project-1\",\"kind\":\"custom\"} /--><!-- wp:navigation-link {\"label\":\"Project 2\",\"url\":\"/projects/project-2\",\"kind\":\"custom\"} /--><!-- wp:navigation-link {\"label\":\"Project 3\",\"url\":\"/projects/project-3\",\"kind\":\"custom\"} /--><!-- wp:navigation-link {\"label\":\"Project 4\",\"url\":\"/projects/project-4\",\"kind\":\"custom\"} /--><!-- wp:navigation-link {\"label\":\"Project 5\",\"url\":\"/projects/project-5\",\"kind\":\"custom\"} /--><!-- /wp:navigation-link --><!-- wp:navigation-link {\"label\":\"Contact\",\"url\":\"/contact\",\"kind\":\"custom\"} /-->';\n\nwp_insert_post(array(\n 'post_type' => 'wp_navigation',\n 'post_title' => 'Test Navigation Menu',\n 'post_status' => 'publish',\n 'post_content' => $post_content\n));\n"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment