PHP code example of mwdelaney / sage-wp-nav-submenu

1. Go to this page and download the library: Download mwdelaney/sage-wp-nav-submenu 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/ */

    

mwdelaney / sage-wp-nav-submenu example snippets


wp_nav_menu( array(
  'menu'     => 'Menu Name',
  ...
  'sub_menu' => true
) );

wp_nav_menu( array(
  'menu'          => 'Menu Name',
  ...
  'sub_menu'      => true,
  'direct_parent' => true
) );

wp_nav_menu( array(
  'menu'        => 'Menu Name',
  ...
  'sub_menu'    => true,
  'show_parent' => true
) );

wp_nav_menu( array(
  'menu'        => 'Menu Name',
  ...
  'sub_menu'    => true,
  'show_parent' => true,
  'show_parent_only' => true
) );