Tagged: remove header
-
AuthorPosts
-
April 6, 2014 at 12:32 pm #247900
Hi All,
Working on my third enfold licensed website. This time my client needs to have a onepager with a left floating menu.
I am using a static styled & responsive sidebar for this.Two questions I have:
1- what is the best way to really remove the header (also for mobile) Something better than css? Function for child menu?
2- When you scrollto a section by id, there is an offset at the top, how do I set this to 0, so the section is scrolled flush to top of browser?? Function for childtheme?Any help is greatly appreciated.
Thomas Borkent
April 6, 2014 at 1:28 pm #247903Just also noticed that when I scroll to lets say section3 the offset or gap at the top shows a little bit of the previous section, therefor it highlights that section in menu… a little strange.
Cheers,
TApril 6, 2014 at 1:29 pm #247904This reply has been marked as private.April 7, 2014 at 4:51 pm #248279Hi All,
I have tackled most of the points above except the offset problem.
On a one pager, it scrolls to about 127px from the top of browser instead of 0px.I just cant find where this is defined, any help would be greatly appreciated!
Kind regards,
Thomas BorkentApril 7, 2014 at 4:59 pm #248283Hi!
Please go to Enfold/Js folder and open Avia.js file and find “Smooth scrooling when clicking on anchor links”
P.S.: Your modifications looks awesome!Cheers!
YigitApril 7, 2014 at 6:37 pm #248361Ok did that, now what do I change there to just remove the gap? Can we do the modification with a function in childtheme?
I am glad you like my modifications, its all done with css only, no core files touched :).
April 7, 2014 at 6:58 pm #248378almost (still a 1px gap :-/ ) got it by using:
if(tempPadding > 0 && shrink) { tempPadding = 0; } else { tempPadding = 0; }
any way to do this by using a childtheme function?
- This reply was modified 10 years, 7 months ago by borkent.
April 8, 2014 at 8:02 am #248674Hi!
If you want to replace the default avia.js file with a custom version insert this code:
if(!is_admin()) add_action('wp_enqueue_scripts', 'avia_register_child_frontend_scripts', 100); function avia_register_child_frontend_scripts() { $child_theme_url = get_stylesheet_directory_uri(); wp_dequeue_script('avia-default'); //register js wp_register_script( 'avia-default-child', $child_theme_url.'/js/avia.js', array('jquery'), 1, true); wp_enqueue_script( 'avia-default-child' ); }
into your child theme functions,php file and then place the custom avia.js file into your child theme folder (url path must be wp-content/themes/enfold-child/js/avia.js ).
Cheers!
Peter -
AuthorPosts
- You must be logged in to reply to this topic.