Archived topic
Same header on every page as announcement
5 replies · Started by Raphael on January 11, 2017
Hi,
1. Static home page.
2. How do I make the separate page header I created on the home page appear on every page without have to edit every page.I want to use the page header as an banner announcement type thing across the entire site.
Hi Raphael,
If you add the design in Header widget in Dashboard > Appearance > Widgets and customize it using the Customizer (Layout > Header/Page Header, Background Images > Header etc) then it should be universal on all pages.
Let me know.
i already have the header designed with css and the logo in it. Because this website offers classes periodically they will need to make site announcements about class cancellations etc. We want to do this using the extra page header function but then assign it to all pages.
they don't want ot have to edit the static header every time
I was curious why the blog roll looks like it has this feature but not the static pages.
Ahh I think what you need is the generate_before_header_content hook or the generate_before_header hook. See some related articles below on where they are and how to use them.
http://demo.generatepress.com/hook-locations/
https://docs.generatepress.com/article/generate_before_header_content/
https://docs.generatepress.com/article/generate_before_header/
Let me know if this helps.
Those hooks are available in GP Hooks as well so you don't need to write the functions.
If you want to use the Page Header add-on, you can use the Blog Page Header and apply it to every page with a filter: https://docs.generatepress.com/article/blog-page-header/
created the header in blog page header content. very simple with no background color because it changed the entire header. gave it a class for quick css.
<div class=annoc> Online Registrations Coming Soon! The Tin Can Chandelier building is opening on February 1st. Questions? Give us a call or email us!</div>
added css to color background and text. some padding via simple css plugin
.annoc {background-color: #63898C; padding: 10px; color: #fff;}
installed code snippets plugin
created and activated a snippet from help section to show blog header on all pages https://docs.generatepress.com/article/blog-page-header/
add_filter( 'generate_get_blog_page_header','__return_true' );
We now have a very easy and simple announcement under the header on every page we can change in the blog header and turn on and off by activating/deactivating the code snippet
it the teal box under the header http://tincanartstudio.com/
Thanks