• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

nerdworker.com

Doing the nerd work so you don't have to.

  • Solutions
  • Projects
  • Blog
  • About
  • Contact
Home ⟩ Blog ⟩ Adding the Dashboard Column Layout Back to the WordPress Admin
Adding the Dashboard Column Layout Back to the WordPress Admin

December 20, 2016 Tutorials 1 Comment

Share on Twitter Share on Facebook Share on LinkedIn Share on Email

Adding the Dashboard Column Layout Back to the WordPress Admin

Adding the Dashboard Column Layout Back to the WordPress Admin

Once upon a time, the WordPress dashboard column layout was configurable from the screen options (located at the top right of the screen). Remember that? You used to have the option to select from 1 to 4 columns of widgets. What ever happened to that?

Somewhere around version 3.8, WordPress removed the ability to set your desired number of dashboard columns. I’m not sure why, but I suspect it was because of the new responsive design. It’s a minor feature, but something I used often. So I set out to put the functionality back in. I have long since forgotten where I originally found this information (my apologies to that helpful individual). But since I rarely see this mentioned, it may come in handy to you. Bear in mind that this may break the responsive behavior of your dashboard. But if you’re like me and rarely use your WordPress dashboard on mobile screens, read on:

How to Add the Dashboard Column Layout Back to the WordPress Admin

Add the following code to your functions.php file, or better yet, create a custom functionality plugin for all the code you add that is not theme-specific. That way, your code stays even if the theme changes.

//* Add column layout to the admin dashboard
if ( is_admin() ) {
  function my_custom_dashboard_layout() {
    add_screen_option(
      'layout_columns',
      array(
        'max'     => 4,
        'default' => 2,
      )
    );
  }
  add_action( 'admin_head-index.php', 'my_custom_dashboard_layout' );
}

In the above code, max is the maximum number of columns (I wouldn’t use more than 4) and default is the number of starting columns.

That’s it! Add this code to take your dashboard column layout from unchangeable sadness to customizable happiness.

Reader Interactions

Comments

  1. Mind Machine Media

    December 21, 2016

    Congratulations on your website redesign and for publishing your first blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Recent Posts

  • Adding the Dashboard Column Layout Back to the WordPress Admin

Topics

  • Tutorials

Search

Footer

Located in Tucson, Arizona

  • Facebook
  • LinkedIn
  • Twitter
  • Home
  • Solutions
  • Projects
  • Blog
  • About
  • Contact

Copyright © 2023 nerdworker.com • Doing the nerd work so you don't have to.