Wordpress: Is there a way to adjust the Column Width for the Post table?

0 votes
asked Aug 24, 2010 by mike-carter

None of the suggested topics about width concern WordPress. What I need is a way to adjust the width of the Posts table which comes up when Posts is selected (Title Author Categories, etc.) I've looked in Appearance/Edit at every .php Template and can't find anything relating to this. I'm sure I've missed something. Also, I have no immediate need for the "Date" and "Tags" columns. Can I either delete these or least hide them?

Thanks, Mike Carter

3 Answers

0 votes
answered Aug 25, 2010 by pp19dd

You can do this by creating a tiny plugin and activating it:

Plugin Name: hidey

add_action('admin_head', 'hidey_admin_head');

function hidey_admin_head() {
    echo '<style type="text/css">';
    echo '.column-date { display: none }';
    echo '.column-tags { display: none }';
    echo '.column-author { width:30px !important; overflow:hidden }';
    echo '.column-categories { width:30px !important; overflow:hidden }';
    echo '.column-title a { font-size:30px !important }';
    echo '</style>';

Obviously, make your CSS adjustments as needed.

0 votes
answered Sep 15, 2017 by john-payne

I had a problem with my double glazing blog, where the Titles of the Posts list were only displaying 3 characters wide, so you had to read way down the page to work out the Title. More annoyingly, everything was fine with my Pages list.

The answer wasn't in changing the width of the column- my first guess. The problem was that there were TOO MANY columns enabled.

On ANY Admin page, try going to the top right of the screen, and look for the Screen Options button. Click that, and you are presented with all the options you can choose from to display information. I simply deselected a number of choices I didn't need. Hey, Presto, with less columns, my Title column became wider. Hope this helps.

0 votes
answered Sep 15, 2017 by gavin

If you want to do this for only a custom post type's post table, you can add the following action into your functions.php file (or create a small plugin like in pp19dd's answer):

add_action('admin_head', 'mytheme_admin_head');
function mytheme_admin_head() {
    global $post_type;
    if ( 'my_custom_post_type' == $post_type ) {
        ?><style type="text/css"> .column-date { width: 20%; } </style><?php
Welcome to Q&A, where you can ask questions and receive answers from other members of the community.
Website Online Counter