- This topic has 16 replies, 3 voices, and was last updated 7 years, 3 months ago by Tom.
-
AuthorPosts
-
August 23, 2016 at 11:12 am #220722Nirvana Tours SAAugust 23, 2016 at 11:54 am #220732TomLead DeveloperLead Developer
You could use the Page Header add-on.
In “Advanced Settings”, choose to merge the header, and enable the “Place content behind header” option.
August 23, 2016 at 11:58 am #220733Nirvana Tours SAHi Tom
Sorry, but I’m very new to this – where do I find “Advanced Settings” – I’ve looked everywhere I can think of.
August 23, 2016 at 11:59 am #220734TomLead DeveloperLead DeveloperNo worries!
In the Page Header metabox: https://generatepress.com/knowledgebase/generate-page-header/
August 23, 2016 at 12:21 pm #220735Nirvana Tours SAHi Tom
I don’t have that tab in my Page Header Metabox.
It was there for a second but then disappeared again.
I only have Image/Content/Logo settings.I’m using GP ver 1.3.39
August 23, 2016 at 12:45 pm #220745Nirvana Tours SAI also just realized that this is for a page header.
I would like this to be for the site header that will appear on all my pages.August 23, 2016 at 8:17 pm #220821TomLead DeveloperLead DeveloperAh I understand.
It’s not easy to do I’m afraid.
You could try adding something like this into the “Before Header Content” hook:
<div class="fixed-slider-background"> Your slider shortcode in here </div>
Then add this CSS:
.fixed-slider-background { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; z-index: 1; } .site-branding, .site-logo, .header-widget { z-index: 2; position: relative; } .site-header { overflow: hidden; } .metaslider .theme-default .nivoSlider, .metaslider .theme-default .nivoSlider img { height: 100%; }
Untested, but should be a decent start.
August 24, 2016 at 8:16 am #220919Nirvana Tours SAThanks Tom
That code worked, but the only thing now is that the logo and menu bar is stuck behind the slider images.
I tried changing the z-index values, but this puts the slider either all the way back behind the header background.Any ideas?
August 24, 2016 at 9:06 am #220927TomLead DeveloperLead DeveloperAny chance you can show me?
August 24, 2016 at 10:04 am #220944Nirvana Tours SAHi Tom
Website is http://www.nirvanatourssa.com
If you need access to the wordpress editor just let me know where I can email a temporary login details for you.
Regards
GeordieAugust 24, 2016 at 10:14 am #220948TomLead DeveloperLead DeveloperAh, try adding it into the Before Header Content hook instead of the Before Header hook.
August 24, 2016 at 10:34 am #220949Nirvana Tours SAStill no change when placing it in “Before Header Content” hook.
Also, it doesn’t resize correctly when viewing in tablet or mobile mode.
The slider doesn’t seem to be actually replacing the header background, but rather floating on top of it – if that makes any sense to you.August 24, 2016 at 10:56 am #220950TomLead DeveloperLead DeveloperI just adjusted the CSS above: https://generatepress.com/forums/topic/add-slider-behind-the-header-logo/#post-220821
There’s no way to make it the actual background unless you find a plugin that specifically does that.
This is the only way to make a slider act like a background I’m afraid – at least the only way that I’m aware of.
August 24, 2016 at 11:15 am #220957Nirvana Tours SAAah Tom, a big ups to you man.
That works just fine.
I’ll have to buy you a coffee when payday rolls by next.
Thanks for all your assistance – and patience.
GeordieAugust 24, 2016 at 11:19 am #220961TomLead DeveloperLead DeveloperYou’re welcome, I’m glad I could help 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.