Skip to content

Instantly share code, notes, and snippets.

@getdave
Last active October 7, 2025 13:26
Show Gist options
  • Select an option

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

Select an option

Save getdave/87ed3f6b18165404b6a893fa88c39845 to your computer and use it in GitHub Desktop.
Blueprint Nav Overlay Anchor Testing
{
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
"meta": {
"title": "Navigation Block with Hash Links",
"description": "Testing Navigation Block with Hash Links",
"author": "automattic"
},
"landingPage": "/wp-admin/site-editor.php?canvas=edit",
"preferredVersions": {
"php": "8.3",
"wp": "latest"
},
"login": true,
"steps": [
{
"step": "resetData"
},
{
"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": "wp-cli",
"command": "wp post create --post_type=wp_navigation --post_title='Test Navigation Menu' --post_status=publish --post_content='<!-- wp:navigation-link {\"label\":\"Breaking Anchor\",\"url\":\"#breakingtext\",\"kind\":\"custom\"} /-->'"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment