Skip to content
This repository has been archived by the owner on Sep 11, 2020. It is now read-only.
/ blanq-bootstrap-nav Public archive

Plug-in for the Blanq WordPress theme. Extends the built-in Walker class to better integrate with the Twitter Bootstrap Framework navbar.

Notifications You must be signed in to change notification settings

da-n/blanq-bootstrap-nav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Blanq Bootstrap Menu

Warning: this is pre-alpha, only here as a placeholder

Plug-in component for the Blanq WordPress theme. Extends the built-in Walker class to better integrate with the Twitter Bootstrap Framework navbar. Original Extended Walker class used in this plugin credit to johnmegahan.

Installation

Method 1

  1. Download zip archive.
  2. Upload using plugin Upload tool yourdomain.com/wp-admin/plugin-install.php?tab=upload.
  3. Activate.

Method 2

  1. Download and unzip the archive.
  2. Upload the zip to wp-content/plugins/.
  3. Activate.

Usage

A menu needs to be available within WordPress and its ID should be passed as an option. By default the plugin automatically creates a menu called Top Bar with the id top-bar which you can use. To render a menu simply drop the following code into a Blanq Theme PHP template file, adjust the options as required.

if (function_exists('blanq_bootstrap_nav')) {
  blanq_bootstrap_nav(array(
    'theme_location' => 'top-bar', // the id of the menu
    'depth' => 0, // how many levels deep should the menu go, 0 for unlimited
    'container' => false, // should a container be created
    'container_class' => 'navbar', // the container classes, requires 'navbar' class at minimum
    'menu_class' => 'nav' // the menu classes, requires 'nav' class at minimum
  ));
}

Example with branding and search menu:

<div class="navbar navbar-fixed-top">
  <div class="navbar-inner">
    <div class="container">
      <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </a>
      <a class="brand" href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?></a>
      <div class="nav-collapse">
        <?php 
        if (function_exists('blanq_bootstrap_nav')) {
          blanq_bootstrap_nav(array(
            'theme_location' => 'top-bar',
            'depth' => 0,
            'container' => false,
            'container_class' => 'navbar',
            'menu_class' => 'nav'
          ));
        }
        ?>
      </div>
    </div>
  </div>
</div>

Acknowledgments

About

Plug-in for the Blanq WordPress theme. Extends the built-in Walker class to better integrate with the Twitter Bootstrap Framework navbar.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages