Add Scrollspy to the Navbar


Note :This snippet works only with the Classical style option. The Classical style option can be enabled in Appearance > Customize > Advanced > Theme Style. More about the theme style option here


Last Reviewed: 8-Jun-15 (3.3.23) 3.1.* 3.2.* 3.3.*

If you need to add Scrollspy to the Navbar:

Where to copy/paste this code?
We strongly recommend you create a child theme. Everything you need to know about creating a child theme with Customizr here.

 

Where to copy/paste this code?
We strongly recommend you create a child theme and add this to the Child Theme functions.php.
Download a start-up child theme here.

Remember: you shouldn’t edit the theme’s functions.php.

To make this change, you must create a child theme. Everything you need to know about creating a child theme with Customizr here.
Download a free start-up child theme here

Related Snippets you may also like


We can help you to implement this snippet

Coding is our job and we know WordPress inside and out. We can help you to customize your website with small chunks of code snippets like this one.

Send us your request and we'll get back to you quickly.



9 thoughts on “Add Scrollspy to the Navbar

  • Rune Abro

    Any chance of a version that: links color to theme-color and maybe an added “down” button (helpful to indicate that more content follows)? 🙂

  • Dave Bardell Post author

    I’m sorry you’ve had problems with this snippet. Difficult to know what is missing without seeing links to your sites. My site that has it working is: http://www.scmtc.co.uk

    Probably best if you open up a new thread in the Forum with a link to your site so I can work out what I’ve missed.

  • Giorgio Riccardi

    Hi Dave,
    am I missing something? other than pasting your snippets in the style.css and functions.php
    what I’m supposed to do exactly within the page or the post?
    I know that I have to organize content, somehow, but do you have any tip on this?
    A sample to grab and study would also come handy to achieve something nice like:
    Themes&co Documentation

    Thanks!

  • Baronet

    Unfortunately the above code didn’t work for me either. I used it in child theme style.css and it didn’t do anything.

    • Dave Bardell Post author

      Sorry to hear that. It is a new Snippet which worked for me, but maybe I missed something.

      I’d suggest the Forum would be a better place to get a solution for this, with a much wider audience to help fix problems. And important, please include a link to your Site.

Comments are closed.