This topic is: not resolved
- This topic has 29 replies, 3 voices, and was last updated 11 years, 10 months ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Community Forums › Forums › Archived Forums › Design Tips and Tricks › different banners on different pages
This is working for me
add_action(get_header, remove_header); function remove_header() { if( ! is_home() ) { remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); remove_action( 'genesis_header', 'genesis_do_header' ); remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); }}
John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography
You'll need to remove the large banner header from Appearance > Header if you add the code i posted because its added using the HTML in the code.
perhaps it is a difference in themes? It didn't work for me. It hid the header AND the navigation on the home page and gave all of my text a weird shadow effect, and messed about with the placement of the footer widgets! Weird.
But it DID work on all the other pages EXCEPT the home page.
help?
that previous answer was for John. Brad -- I'll try doing that and see what happens. That's probably it!
thanks!
Brad -- I did that, but something is backwards here. Now the shorter banner is appearing on the home page, where I DON't want it. And NO banner is appearing on the other pages.
So what I want is for the larger header to appear on the home page with the header widget content on the right. And the smaller banner to appear on ALL of the other pages of the site, without the header widget.
Brad - explain to me what this does:
if
( ! is_home() ) {
If it's the home page, then do the following? Shouldn't it be if it's NOT the home page, then do the following? Is that what the exclamation point means? if NOT is_home then do this... ?
pardon my ignorance of php!
!is_home() If its Not the home page.
is_home() If its the home page
http://codex.wordpress.org/Conditional_Tags
You're also going to have a problem with this code:
/** Add support for custom header */ add_theme_support( 'genesis-custom-header', array( 'width' => 960, 'height' => 115 ) );
The height is different for the homepage and other pages so you'll need a conditional tag here also as you header image banners are different heights.
The code i supplied works for me. The only problem is the gap caused by the banner height difference
Are you using the genesis_header Hook and genesis_before_header Hook?
© 2024 WPEngine, Inc.