Skip to content

Instantly share code, notes, and snippets.

@marklchaves
Created February 25, 2024 09:59
Show Gist options
  • Save marklchaves/7e38eba1fed80a49be8b4e9b141937e7 to your computer and use it in GitHub Desktop.
Save marklchaves/7e38eba1fed80a49be8b4e9b141937e7 to your computer and use it in GitHub Desktop.
Content Control restrict header example
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|10","left":"var:preset|spacing|10","top":"var:preset|spacing|10","bottom":"var:preset|spacing|10"}}},"backgroundColor":"accent","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"},"contentControls":{"enabled":false,"rules":{}}} -->
<div class="wp-block-group has-accent-background-color has-background" style="padding-top:var(--wp--preset--spacing--10);padding-right:var(--wp--preset--spacing--10);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)"><!-- wp:site-logo {"width":79,"shouldSyncIcon":true} /-->
<!-- wp:paragraph {"fontSize":"large","contentControls":{"enabled":false,"rules":{"user":{"userStatus":"logged_out","roleMatch":"any","userRoles":[]}}}} -->
<p class="has-large-font-size">Logged-out Menu</p>
<!-- /wp:paragraph -->
<!-- wp:navigation {"ref":56,"layout":{"type":"flex"},"fontSize":"large","contentControls":{"enabled":false,"rules":{"user":{"userStatus":"logged_out","roleMatch":"any","userRoles":[]}}}} /--></div>
<!-- /wp:group -->
<!-- wp:group {"style":{"spacing":{"padding":{"right":"var:preset|spacing|10","left":"var:preset|spacing|10","top":"var:preset|spacing|10","bottom":"var:preset|spacing|10"}}},"backgroundColor":"accent-4","layout":{"type":"flex","flexWrap":"nowrap","justifyContent":"space-between"},"contentControls":{"enabled":false,"rules":{}}} -->
<div class="wp-block-group has-accent-4-background-color has-background" style="padding-top:var(--wp--preset--spacing--10);padding-right:var(--wp--preset--spacing--10);padding-bottom:var(--wp--preset--spacing--10);padding-left:var(--wp--preset--spacing--10)"><!-- wp:site-logo {"width":79,"shouldSyncIcon":true} /-->
<!-- wp:paragraph {"fontSize":"large","contentControls":{"enabled":false,"rules":{"user":{"userStatus":"logged_in","roleMatch":"any","userRoles":[]}}}} -->
<p class="has-large-font-size">Logged-in Menu</p>
<!-- /wp:paragraph -->
<!-- wp:navigation {"ref":22,"layout":{"type":"flex"},"fontSize":"large","contentControls":{"enabled":false,"rules":{"user":{"userStatus":"logged_in","roleMatch":"any","userRoles":[]}}}} /--></div>
<!-- /wp:group -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment