Skip to content
Prem Tiwari
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk
Prem Tiwari

How to reorder meta box position in WordPress

ByPrem Tiwari December 13, 2024December 13, 2024

How to reorder meta box position in WordPress. In the following example, replace CPT with the post type name, like post, page, book, event, imaginary, foobar…

add_filter( 'get_user_option_meta-box-order_CPT', 'metabox_order' );
function metabox_order( $order ) {
    return array(
        'normal' => join( 
            ",", 
            array(       // vvv  Arrange here as you desire
                'customdiv-{CPT}',
                'authordiv',
                'slugdiv',
            )
        ),
    );
}

Related Questions

  • What is the full form of MLA?
  • How to git stash pop specific stash?
  • What is the full form of MAA?
  • What is the full form of SMILE?
  • KG Full Form | What is the full form of KG?
  • How to git-cherry-pick only changes to certain files?
  • What is the full form of OSI?
  • How to update a GitHub forked repository?
  • What is the full form of Covid 19?
  • What is the full form of HFS?

Collections

  • Crawling and indexing
  • Meetup
  • PHP
  • Plugins
  • SEO
  • Tech Talks
  • WooCommerce Tutorials
  • WordCamp
  • WordPress Tutorials
  • Privacy
  • Cookies
  • Disable Update Notifications
Facebook Twitter Instagram YouTube Linkedin WordPress
Scroll to top
  • WP Tutorials
  • Plugins
  • About Me
  • Featured On
  • Let’s Talk