How to adjust wordpress post list column width

My posts column width is so narrow that it is even difficult reading title and take so much of time. whereas other not needed columns are so broad. So i decided to change the column width of my post lists and thought of sharing the same here so that others can also do if needed.

You can edit functions.php to edit width of columns in post list or else disappear some of the columns you do not want.

Open Functions.php

  • Login to wordpress dashboard
  • Go to appearance tab
  • Click Editor sub-tab
  • Open functions.php from list of programs
  • Scroll down to end of program

Add following code

For each column there is column name like column-title, column-tags etc. You can following code to adjust width of columns in pixels by mentioning width in pixels

add_action('admin_head', 'my_admin_column_width');
function my_admin_column_width() {
    echo '<style type="text/css">
        .column-title { text-align: left; width:200px !important; overflow:hidden }
        .column-author { text-align: left; width:100px !important; overflow:hidden }
        .column-categories { text-align: left; width:100px !important; overflow:hidden }
    </style>';
}

If you want any column to hide, write display:none for that column

echo '.column-date { display: none }';

You can also adjust width using percent.

.column-mycolumn { width:20%; }

Make sure you do not have other styles over ruling these.

I hope it will help you adjusting width of columns for your post list.


$1*/ mo WordPress hosting! Get going with GoDaddy!Related Post –

  1. How to restrict access to your admin page
  2. How to block access to xml-rpc file access and secure your website.
Facebook Comments

NO COMMENTS