PHP code example of iantsch / mu-nav-menu

1. Go to this page and download the library: Download iantsch/mu-nav-menu 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/ */

    

iantsch / mu-nav-menu example snippets


$args = array(
    'base_class' => 'main-menu', // Optional. Default: menu
    'theme_location' => 'main-menu'
);
bem_nav_menu($args);

array(
    'post_type' => $item->object,
    'posts_per_page' => -1,
    'post_parent' => 0,
)

array(
    'post_type' => $taxonomy->object_type,
    'posts_per_page' => -1,
    'post_parent' => 0,
    'tax_query' => array(
        array(
            'taxonomy' => $item->object,
            'field' => 'id',
            'terms' => $item->object_id
        )
    )
)