Giter Site home page Giter Site logo

wp-bootwalker's Introduction

WP BootWalker

WordPress Nav Walker to implement multilevel Bootstrap 4.0.0-beta navbars.


Requirements

  • PHP 5.4+
  • WordPress 4.4+

Installation

Easy installation with Composer.

  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/bccampus/wp-bootwalker"
    }
  ],
    "require": {
      "bccampus/wp-bootwalker": "^1.0"
    },

Usage (Bootstrap 4)

Update wp_nav_menu() to use the BCcampus\BootWalker walker. For example:

<?php

wp_nav_menu([
    'theme_location' => 'primary_navigation',
    'menu' => 'Primary Navigation',
    'depth' => 3,
    'container' => 'div',
    'container_class' => 'collapse navbar-collapse',
    'container_id' => 'navbarNav',
    'menu_class' => 'navbar-nav mr-auto',
    'fallback_cb' => '__return_empty_string',
    'walker' => new \BCcampus\BootWalker()
]);

Bootstrap Navbar Documentation

Additional CSS

You will want to modify the look and feel of the tier 3 'submenu'. Something like this will get you started.

.submenu{
  background-color: grey;
  padding-left: 1.70rem;
  a{
    font-size: smaller;
  }
}

License

This has been modified from the original which is Copyright (c) 2017 Indigo Tree. Modifications are Copyright © Brad Payne and are released under the same MIT license.

The MIT License (MIT).

wp-bootwalker's People

Watchers

James Cloos avatar Neer Bappoo 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.