WordPress implements a simple order functionality by default.
What’s the common method, to retrieve the menu_order
for the current post or page?
WordPress implements a simple order functionality by default.
What’s the common method, to retrieve the menu_order
for the current post or page?
You must be logged in to post a comment.
If you have the post with an
$id
:WordPress itself does not provide a function to get the
menu_order
, so you have to query thepost
-Object. If you are outside the loop, you can use the above function, however inside the loop you could also achieve this by: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).
You can try following code: