Archived topic
Custom Header Widget Required
3 replies · Started by Harpreet Kumar on February 28, 2021
How can I create a custom widget like WPBeginner (widget just after header & menu), on my blog wpblogging101.com?
I am using GeneratePress + GP Premium + GenerateBlocks.
Hi there,
do you mean the Banner below the site header ?
If so you can use a Block Element:
https://docs.generatepress.com/article/block-element-overview/
Build what ever content you want using GB.
And set the Hook to after_header
Set the Display Rules to Entire site.
Yes David, you get me right.
But I am not good in coding.
Can you provide the code to make this widget?
With the Block Element you don't require any code.
Once you create a new Block Element you will see the default Block editor.
Add a Container Block, go to the Spacing settings and reduce the padding to about 10px. Then the Colors and set the Background color.
Inside the Container Block add a Buttons Block - add your text, icon, link etc. and change the colors to suit.