Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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

    #247903

    Just 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,
    T

    #247904
    This reply has been marked as private.
    #248279

    Hi 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 Borkent

    #248283

    Hi!

    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!
    Yigit

    #248361

    Ok 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 :).

    #248378

    almost (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, 8 months ago by borkent.
    #248674

    Hi!

    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

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.