Community Forums › Forums › Archived Forums › Design Tips and Tricks › different banners on different pages
- This topic has 29 replies, 3 voices, and was last updated 13 years, 4 months ago by
Brad Dalton.
-
AuthorPosts
-
January 24, 2013 at 7:15 pm #14491
SoZo
MemberThis 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
January 24, 2013 at 7:24 pm #14495Brad Dalton
ParticipantYou'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.
January 24, 2013 at 7:24 pm #14496fiddles5
Memberperhaps 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?
January 24, 2013 at 7:25 pm #14498fiddles5
Memberthat previous answer was for John. Brad -- I'll try doing that and see what happens. That's probably it!
thanks!
January 24, 2013 at 7:31 pm #14500fiddles5
MemberBrad -- 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.
January 24, 2013 at 7:36 pm #14503fiddles5
MemberBrad - 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!
January 24, 2013 at 7:44 pm #14504Brad Dalton
Participant!is_home() If its Not the home page.
is_home() If its the home pagehttp://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
January 24, 2013 at 7:54 pm #14508Brad Dalton
ParticipantAre you using the genesis_header Hook and genesis_before_header Hook?
January 24, 2013 at 8:13 pm #14512fiddles5
MemberThis reply has been marked as private.January 24, 2013 at 9:04 pm #14526Brad Dalton
Participant -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.