You can’t use get_post_meta
since the menu_order
is stored in the posts
table, like you said. But you can set up an easy database query to get the value.
$menu_o = $wpdb->get_var( "SELECT menu_order FROM $wpdb->posts WHERE ID=" . $post->ID );
echo $menu_o;
Related Posts:
- New page does not get a menu_order
- How to change the position of menu item?
- How to use “menu_order” field for posts?
- Get current menu_order
- Are there any reasons you can’t use strings for admin menu positions?
- Order terms by term_order
- Adding a menu item in the admin bar
- wp_list_categories: order by term order?
- How do I order pages and categories by ID or name in the same query?
- Reorder custom submenu item
- Menu position (admin menu) of pages
- WordPress altering my custom query, How to fix it?
- WordPress 3.5 Gallery Menu Order not set?
- If orderby parameter using pre_get_posts is the same for multiple posts what fallback does the query use?
- How to scroll item in the Menu setting effectively?
- Change default ordering of taxonomy terms – pre_get_terms
- previous next with custom-post-type by order attribute
- Page Attachment Permalink Structure based on Menu Order?
- Resetting menu_order to 0 for posts in PHPmyAdmin?
- How to change admin menu position of “Media”?
- Logout hyperlink within a sub-menu
- menu_order not working with slugs that start with admin.php
- WP_Query Excluding pages with Order is 0
- Is there a way to order posts and custom post types as one group?
- How to get_posts where ‘menu_order’ is more than 0/zero?
- How to set multiple `orderby` in query argument?
- Change position of media in admin menu
- Why isn’t my multiple orderby working?
- Sort CPT archive by order prevents sorting in admin
- How to order WP_Query by parent for hierarchical Custom Post Type?
- I Changed the Menu Order, But the Page Order Didn’t Change on Front Page
- Woocommerce – Changing the order of the upsell products [closed]
- Menu items suddenly are displayed all over the page [closed]
- How do I get post attachments in menu_order in WordPress?
- get_pages() as per custom menu order
- Compare string with post id in wpdb and do stuff when match is found
- Add item to top of menu using a filter in functions.php
- Exclude pages by menu order
- Changing menu order of a specific plugin in dashboard
- rearrange the posts by published date in Menu posts selection
- Using menu_position to add two entries between Dashboard and Posts
- Orderby menu_order not working; menu is sorted on publish date
- WordPress Admin Menu Order for ‘admin.php’ pages
- Sort get_children by menu_order
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- Custom admin menu order fails if slugs are complicated
- How to change custom post order ASC/DESC menu_order wise dynamically?
- Product categories are mixed when creating menu
- Custom Admin Menu Order for all User Roles
- Display query post based on two orderby value in wordpress
- Beyond widget side menu editing, with the php page, custom template
- How to sort a sub-menu, generated with get_pages(), by the page order instead of alphabetically?
- Menu order of parent menu from perspective of child menu
- Query posts from multiple post types sorted by overarching menu order
- Creating and populating custom nav menu (menu-item-position not working)
- Order posts by separate menu order for different sub-categories
- Echo order box (in pages)
- List CPT by menu_order with children right after parent
- Trying query woocommerce product order by menu order and stock status
- How can I set the default ‘orderby’ and ‘order’ parameters for a REST API call?
- Can I use WP_Query to find a post with a particular menu_order?
- What happened to the Menu Order option for posts (for ordering posts by Menu Order in Block Editor (Gutenberg)?
- Display posts from Custom Post Type, group by term, arrange term groups and arrange items within groups by menu order