Hi,
I’m trying to make a one page site. I am using color sections with ID’s and linking to the anchors in the menu.
We don’t need a logo so i removed the logo but now when i click an anchor the browser does not scroll to the right position anymore and there is a gap visible. See attached link.
I changed the top padding to 0 but still no succes.
Can you help me with this?
Hey Rhodo,
Please see this post: https://kriesi.at/support/topic/menu-anchors-scroll-to-section-offset/#post-520734
Best regards,
Mike
Hi Mike,
Thanks that solved my problem :-)
I am using a child theme. What should i do to implement this the right way?
Hi,
Glad to hear that. You can create a js folder in your child theme and paste in your modified avia.js file there, then on functions.php of your child theme add this code:
function change_aviajs() {
wp_dequeue_script( 'avia-default' );
wp_enqueue_script( 'avia-default-child', get_stylesheet_directory_uri().'/js/avia.js', array('jquery'), 2, true );
}
add_action( 'wp_enqueue_scripts', 'change_aviajs', 100 );
Hope this helps :)
Best regards,
Nikko
Hi Nikko,
Thanks that worked!
Have an awesome day!