Archived topic
Custom page header globally
5 replies · Started by Raul on May 14, 2017
Hello!
It would be great to be able to configure the page header of all the pages and posts from the customizador, leaving a homogenous aspect for all the titles.
My idea is to have a H1 title centered with a white color on a full width gray background bar just below the menu.
Currently page by page, it is a job but it can be assumed. However for the posts is not feasible.
For the moment, there is an easy and fast way to do it with a snipset of code in the functions.php + something of css?
Thank you!
Hi Raul,
You mean where the page/post title automatically gets added into your full width header?
This is an option I'm considering. Would you want all of the options that come with the Page Header add-on for something like this? Or just some simple options like:
- Alignment
- BG color
- Use featured image as BG image
- Text color
Hi Tom!
Right now for my case these options would be perfect. But for other sites and cases I think that the other options would also work well ... if you develop this option I think you will have a great reception.
Regards!
Thanks!
For now, this should help: https://generatepress.com/forums/topic/single-blog-post-full-width-featured-image-under-post-title-wsidebar-support/#post-315742
Great!
After css & remove original title looks great.
To remove title
function quitar_remove_title( $title ) {
if ( is_single() ) {
return false;
}
return $title;
}
add_action( 'after_setup_theme','tu_after_setup_theme' );
function tu_after_setup_theme() {
add_filter( 'generate_show_title', 'quitar_remove_title' );
}
Hopefully we can see soon the options we discussed in the customizer.
Thank you!
Regards!
No problem! :)