php - Trying to order results of wp_query by the membership and sort order in wp_nav_menu -
my goal provide easy use interface non-technical site admins "drag , drop" order of slideshow on homepage of wordpress site.
i using wp_query build "featured slideshow" highlights other pages on homepage of site.
in order provide easy way web site admins manage order/appearance of these slides, wanted provide them custom wp_nav_menu item use "drag , drop" set order of slides on homepage.
i have since found out syntax 'orderby' in wp_query not referring wp_nav_menu order , has page_meta value sort order.
my question is, how can pass values wp_nav_menu wp_query can use orderby?
or
how can create "drag , drop" interface web admins manage order of slideshow without having go edit each pages sort order?
if 'featured' post type post or page, can specify orderby => menu_order
within $args
this.
.e.g
$args = array( 'post_type' => 'my-post-type', 'orderby' => 'menu_order' ); $query = new wp_query( $args );
Comments
Post a Comment