Straightforward sticky header #68418
gvgvgvijayan
started this conversation in
Developer Experience
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Actual:
There is no direct, easy way to turn the menu into a sticky menu. Even if you set position to sticky for the group inside header template part it won't work, therefore you have to do a cumbersome way of editing all templates and encase the header part in group then apply sticky position.
Consider if the website is well matured and have many templates for each post types, archives, miscellaneous pages like 404, search, etc. Then we have to touch all templates.
The caveat is also discussed here Sticky Header one of the best site to learn about Gutenberg.
Expectation:
Sticky menu should work out of the box, plus for DX provide an API (
register_template_part_style
) to add custom class to template part as likeregister_block_style
.Summary:
Summary of Sticky Menu Challenges in Gutenberg:
Beta Was this translation helpful? Give feedback.
All reactions