How to get Custom Menu in Query Posts WordPress


<?php
    $args = array(
    'post_type' => 'nav_menu_item', 'orderby'   => 'menu_order',
    'order'  => 'ASC',
    'tax_query' => array(
        array(
            'taxonomy' => 'nav_menu', 'field' => 'slug', 'terms' => 'my'        
        )
    )
);
query_posts($args);
while( have_posts()):the_post();
echo $post->ID;
endwhile; wp_reset_query();?>
Advertisements