Code Monkey home page Code Monkey logo

bootstrap-genesis-fixed-nav's Introduction

Bootstrap Genesis Fixed Nav Plugin

Plugin to make the primary nav fixed. Requires the Bootstrap Genesis theme.

Disable Plugin CSS

You can include the CSS directly in your theme file and disable the plugin CSS. The advantage to this method is you eliminate an asset load improving site load time.

Add this to functions.php to disable the plugin CSS

add_filter( 'bootstrap_genesis_fixed_nav_load_css', '__return_false' );

Fix Anchor Tag Link Scroll

With a fixed nav, a common problem is anchor tags that cause the page to scroll result in the target displaying behind the fixed nav.

Please install the WebDevStudios plugin Hash Link Scroll Offset which addresses this problem by using JavaScript smooth scrolling and an offset to avoiding hiding the content behind the fixed nav.

This offset varies depending on whether or not the admin bar is being displayed. This plugin, Bootstrap Genesis Fixed Nav, applies a filter to set two different values for the scroll offset (one for with and one for without the admin bar).

If you modify the height of your nav, you will need to change these values in the plugin.

Change Log

[1.1.1][2015-08-26]

  • Add composer.json file
  • Add body class .bootstrap-genesis-fixed-nav to target the CSS so it is only applied when the plugin is active. This is relevant when adding the CSS to a theme in order to reduce asset load
  • Add filter to avoid loading CSS - this is useful if the CSS is included directly in the theme.
  • Remove alternate Hash Link Scroll Offset when is_admin_bar_showing() is true (this is now accomodated in the HLSO plugin)

bootstrap-genesis-fixed-nav's People

Contributors

salcode avatar

Watchers

Dave Read avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.