Link to home
Start Free TrialLog in
Avatar of Amanda Watson
Amanda WatsonFlag for Australia

asked on

What needs to be added to the header css to stop the homepage header from being sticky?

Hi,
On this site here http://barefruit.com.au/dev/ you can see the header slides with the content, but on follow on pages, like http://barefruit.com.au/dev/about-us/ the header stays put.
How do I make the homepage header behave in the same way as the rest of the site?

Thanks
Avatar of lenamtl
lenamtl
Flag of Canada image

In this case it always a good idea to compare both page code
I'm using Notepad++ with compare plugin

First to start try to use the same body class on each page.

this is the body class of home
<body class="home blog site_full not_trans_header soc_pos_footer optimizer-pro-child">

Open in new window


this is the body class of about-us
<body class="page page-id-322 page-parent page-template-default site_full not_trans_header soc_pos_footer not_frontpage optimizer-pro-child">

Open in new window


Select the one you prefer and test it, let me know if this fix the problem.
ASKER CERTIFIED SOLUTION
Avatar of David S.
David S.
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Amanda Watson

ASKER

Sorry but is this javascript both found in the  /dev/wp-content/themes/optimizer_pro/assets/js/optimizer.js" file?
or do I embed the first bunch of code into the header,php file in the head?
I just removed the code in the js file, but didn't understand what the first thing to do was in the header?
But removing the function seems to have fixed it?  I couldn't do this in the child theme though could I ?
The JS code embedded in the home page is near the end of the generated page, but I have no idea what template file it might be found in. (I rarely work with Wordpress myself, so don't know how child themes work either.) Since removing the other snippet had the desired effect, leaving the snippet embedded in the home page shouldn't make much of a difference.