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 $post;
$menu_order = $post->menu_order;
The Menuorder is mainly used for Database Queries, as the Name says, do determine the Order of the output (if the menuorder is selected to be the order criteria).
Related Posts:
- Set number of article per number of page
- Determine if page is the Posts Page
- Get the Current Page Number
- Stop WP from creating “Sample Page” and “Hello World!” post
- Keyboard shortcut for updating a page or post?
- Apply the_title() filter in post & page title, but not in menu title
- How to Change Order of Posts in Admin?
- How to display by default only published posts/pages in the admin area?
- Difference between an archive and a page listing posts
- Delete Associated Media Upon Page Deletion
- The next_posts_link() works only with original $wp_query
- Get content from one page and show it on another page
- How to Check if a Page Exists by URL?
- Different post sort order within different categories
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- get_children() Not Working with orderby Parameter
- what types of order can I pass to get_posts() via orderby?
- how to limit edit_form_after_title hook to page and post edit only?
- Using single.php from plugin folder instead of default template folder
- Post/Page Publish/Update button not clickable once I make an edit
- Strategy for handling hierarchical pages with empty parent content
- Skipping first 3 posts in wp query
- Sort posts by popularity/page views
- Custom Field in Featured image for A particular post
- How to add a new tab to page editor
- How to display the page title/content in the Posts page?
- Callback for wp.autosave.server.triggerSave();
- How can I see a list of pages and post where my custom Gutenberg block is used?
- Restore contents of deleted user
- How do I reorder (pop and push) items from WP_Query?
- disable password protected page for logged users
- How to put last edited entry on top of the blog-post list?
- How to change post to page
- Sort post by attributes ‘order’
- RSS for Pages Instead of Posts?
- How to sort posts by last name (2nd word) on ONE category only?
- Query posts from current year
- Display posts by tag on page
- Reverse chronology of post listing
- Why do I need to use The Loop on pages (inside page.php etc)?
- What is the difference between “post” and “page” in WordPress?
- Create custom page in WooCommerce
- posts page – different lengths of excerpt
- WordPress automatic and permanent page
- Is there a WordPress equivalent to MediaWiki templates
- Determining Slug Before and After Edit
- Getting an alphabetic post list with two letters onclick on letter
- Automatically create pages in a post based on number of words
- Static posts page with home.php
- Change WordPress post-state in Admin Area
- Pagination not working on Custom Page Template
- Order Posts by Alphabetical for Each Letter
- Pagination for Pages and Posts
- Is it possible to show a different WP menu when using password protected pages?
- Can I change a post to a page by changing it’s type?
- Overview with latest edited posts and pages
- Problem ordering posts with numbers for titles numerically E.g. 1, 10, 100
- how to show all post in my page-grid.php template page
- eBooks download website, page or post?
- Multiple loops in same page, without duplicate content
- Add a custom option to a page in backend
- Include related posts on a page
- How to choose a sort order (for posts) per category? (ideally when creating a new category)
- Order post by year DESC and month ASC
- why does HTML Tag not working in Post and Page
- Display custom post types by date field
- Creating new page with pre-defined parent page
- problem to delete page
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Populating a page with content from post custom fields
- Can I hide a specific post from latest posts page?
- Hide add new page button
- Edit menu item title from edit page/post
- Redirect before post page
- $post object is null
- How to show post(excerpt) from specific category on wp page?
- When paginating a Page with the tag, how can the 2nd and subsequent page styles be customised?
- orderby=meta_value_num creates duplicate posts
- Is there any WordPress alternative to Book module of Drupal?
- Changing my permalink structure – will new layout conflict with existing page?
- Convert a complex webpage into WP theme
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- Change Order of Admin Posts Depending on Meta
- Display posts in alphabetical order for a particular category
- disable column on post and user list
- WP_Query do not load specifed number of post
- Can a page_id and a post_id be same?
- post re-order on my site
- Display posts from #6 to #20 on archive page
- How to restore permanently trash page? [closed]
- Custom Blog Post Page
- How can I display widget in a Page or Post?
- Single post as homepage?
- Differentiate between posts and pages in search results
- Getting a 404 error when clicking edit page
- Creating a Page of Posts
- Private Posts/Pages & Search
- White Blank Page when Updating and Publishing Page/Post
- Posts vs. Pages
- Can’t get the_content of the parent page from its single post?