Site logo

Archived topic

Add custom elements / customize Off-Canvas-Panel

5 replies · Started by Ben on March 28, 2023

Viewing posts 1–6 of 6

Hi,

I'd like to further customize my Off-Canvas-Panel.

I'm showing different menu items there, I can use another menu, all good.
But I'd also like to
a) futher customize the looks of the menu items
b) insert a small info block with several HTML elements (picture, headline, text, ...)

How is that possible?

Thank you,
Ben

Hi there,

in Appearance > Elements add a new Block Element.

https://docs.generatepress.com/article/block-element-hook/

Set the Hook to either: after_slideout_navigation for the content to appear at the bottom. or inside_slideout_navigation for it to appear above.

Set the Display Rules where you want it.

And then build whatever you want to display in the block editor.

Publish it once you are finished.

That's great! Thanks for the quick answer.

Could I also (re)build the whole off-canvas-area as a block element? Then I'd have complete control over the layout.
Maybe insert an empty menu or so, so I can use the hooks?

Hi Ben,

In that case, you don't have to assign any menu to the off canvas panel, as long as the off canvas panel is on, the hook is available to use.

Awesome, thanks!

No Problem :)

This archived topic is closed to new replies.