PHP code example of jenessawhite / sage-bootstrap4-navwalker
1. Go to this page and download the library: Download jenessawhite/sage-bootstrap4-navwalker 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/ */
jenessawhite / sage-bootstrap4-navwalker example snippets
/**
* Primary Nav Menu arguments
* @return array
*/
public function primarymenu() {
$args = array(
'theme_location' => 'primary_navigation',
...
'walker' => new wp_bootstrap4_navwalker()
);
return $args;
}
@if (has_nav_menu('primary_navigation'))
{!! wp_nav_menu($primarymenu) !!}
@endif
@if (has_nav_menu('primary_navigation'))
{!! wp_nav_menu(['theme_location' => 'primary_navigation', 'walker' => new \App\wp_bootstrap4_navwalker()]) !!}
@endif