Order terms by term_order

As this is one of the top results on Google and none of the above quite worked for me, this did seem to return terms in an order matching their display in the admin… get_terms([ ‘taxonomy’ => ‘whatever_you_want’, ‘meta_key’ => ‘order’, ‘orderby’ => ‘meta_value_num’ ]); In case it helps anyone, WP stores a value in … Read more

Get current menu_order

If you have the post with an $id: $thispost = get_post($id); $menu_order = $thispost->menu_order; WordPress itself does not provide a function to get the menu_order, so you have to query the post-Object. If you are outside the loop, you can use the above function, however inside the loop you could also achieve this by: global … Read more

How to use “menu_order” field for posts?

Apparently it’s as easy as: add_action( ‘admin_init’, ‘posts_order_wpse_91866’ ); function posts_order_wpse_91866() { add_post_type_support( ‘post’, ‘page-attributes’ ); } And then doing the query: $order_posts = new WP_Query(array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, ) );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)