By
05/13/2016   Comments Off on Get the current page order number according to WordPress

View all snippets

This is useful for book chapter numbering if you don’t want to manually add the page number of a child in the title or wherever else:¬†Example usage:

<h1>Chapter <?php echo $post->menu_order;?></h1>