PHP code example of cyberpearuk / wp-bootstrap-nav-walker

1. Go to this page and download the library: Download cyberpearuk/wp-bootstrap-nav-walker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

cyberpearuk / wp-bootstrap-nav-walker example snippets




wp_nav_menu([
    'theme_location' => 'primary',
    'depth' => 2,
    'container' => 'div',
    'container_class' => 'collapse navbar-collapse',
    'container_id' => 'primary-navbar-collapse',
    'menu_class' => 'nav navbar-nav',
    'fallback_cb' => '__return_empty_string',
    'walker' => new \IndigoTree\BootstrapNavWalker\Three\WalkerNavMenu()
]);



wp_nav_menu([
    'theme_location' => 'primary',
    'depth' => 2,
    'container' => 'div',
    'container_class' => 'collapse navbar-collapse',
    'container_id' => 'primary-navbar-collapse',
    'menu_class' => 'navbar-nav',
    'fallback_cb' => '__return_empty_string',
    'walker' => new \IndigoTree\BootstrapNavWalker\Four\WalkerNavMenu()
]);