Archived topic
Page header
10 replies · Started by Fernando on November 24, 2021
Hello,
How can I add a page header so that when clicked it redirects to another page.
Thanks
Hi Fernando,
Not sure I fully understand your question, when you say page header do you mean a page hero?
Something like this:https://docs.generatepress.com/article/block-element-page-hero/
And you want to set a link to the page hero?
If you can explain a bit more that'll be helpful :)
Something like this
Hi Fernando,
You can add this in with a Block element.
Here's what you can do:
1.) Create a Block Element.
2.) Set its type to "Hook" and set the hook option to "after_header" with priority of 1.
3.) Create your layout. (background, text, buttons, etc)
4.) On the button, set the link to the "another page".
5.) On the "Display rule" tab, set the location to the pages you want the layout to display on. (You can set it to entire site if you want it to display site-wide.)
6.) On the same tab, set the exclusion if needed. (I assume you'll have to exclude this to the page were you want the button to redirect site visitors)
7.) Publish the Block element.
This should display the layout after your header as indicated on the image. :D
2) should it be generate_after_header?
3) how to create a simple button?
2) should it be generate_after_header?
Due to there's not enough space, in block element, we removed the generate prefix from the hook name in the element editor. generate_after_header and after_header are the same hook.
3) how to create a simple button?
You can use Buttonsblock of GenerateBlocks if you have the plugin installed, if you don't, there's a WPButtons `block you can use.
GB button:https://docs.generateblocks.com/article/buttons-overview/
wp button:https://wordpress.com/support/wordpress-editor/blocks/buttons-block/
Sorry, but I got lost here.
How can I add a button block inside an element?
Could you do a small video about all this?
Here's a video on how to add social icons in to a block element, those social icons are added using buttons block:
https://youtu.be/q9YyXSBpRR0
I think I have it different, I don't have any blocks
How to enable these blocks?
Hi there,
you have to use the Block Element - not the Hook Element.
Ying linked to one of the Block Element docs for creating that kinda thing:
https://docs.generatepress.com/article/block-element-page-hero/