Archived topic
Can an element be used in a sidebar?
4 replies · Started by Arp on January 9, 2022
I'm trying to make an author widget. When I go to the Widgets page, the dynamic image is not an option (I need to use a dynamic image so that my avatar is automatically updated).
I know that elements can have dynamic images so can I make an element and then use it in the sidebar?
Hi there,
you can set the Block Element -element type to Sidebar:
https://docs.generatepress.com/article/block-element-overview/#right-sidebar-type
This will replace the entire sidebar with your block element
OR
You can set the Element type to Hook and use either the before_xxxxx_sidebar_content or after_xxxxx_sidebar_content for the relevant sidebar to position your element before or after the sidebar widget area
WOAH!!! I been sleeping on the possibilities with block elements. The Hook idea is also possible.
Thanks!
Forgot to resolve topic...
Glad to be of help!