get_pages() as per custom menu order

I’m working on Single Page WordPress Theme where I want to get_pages() as per custom menu order.

I have gone through the reference for get_pages() which only allows for default menu :

Read More
get_pages('sort_order=asc&sort_column=menu_order');

Is there any way to get_pages() as per custom menu order ?

Related posts

Leave a Reply

1 comment

  1. I Have Found My Own Solution.
    I Tried To Get Page ID Of Each Custom Menu Item & Rendered Page Based On That ID.

    Reference : wp get nav menu items

    Like This…

        $menu_name = 'primary-menu';
    
        if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $menu_name ] ) ) {
                $menu = wp_get_nav_menu_object( $locations[ $menu_name ] );
                $menu_items = wp_get_nav_menu_items($menu->term_id);
                foreach ( (array) $menu_items as $key => $menu_item ) {
                    $qcPageID = $menu_item->object_id;
                    $qcPageData = get_page( $qcPageID );
                }
        }