Causes and solutions for posting titles becoming vertically long in the posting list on the management screen

Causes and solutions for posting titles becoming vertically long in the posting list on the management screen

Thank you for visiting. This page is an English translation of the Japanese site [Knowledge Base] using Google Translate. Please understand that there are some points that are difficult to read, such as sentences and expressions.

Have you ever been surprised at this phenomenon when you tried to check past posts with WordPress and opened the post list?

  • The title is displayed over many lines and is difficult to see
  • The title is displayed over many lines, one character at a time, making it very difficult to see.

This isn’t a WordPress bug, it has a decent cause, and it’s easy to fix by doing one of the two methods on this page.

Let’s solve it quickly by the method that suits your skill.

Cause of the title becoming vertically long in the post list

This inconvenience (fault) is caused by a large number of columns (items) to be displayed or by specifying a large width, so use the following method to adjust.

How to prevent the title from becoming vertically long in the post list

If you want to deal with it easily, adjust it with “Display Options”.

Click the tab (button) called “Display Options” in the upper right corner of the post list.

The columns that are currently displayed are checked, so uncheck the columns that you do not normally see.

Then, you can see that the width of the column changes in real time and it becomes easier to see, so finish it with just the right feeling.

If you want to deal with it properly, add the code to specify the width.

If you deal with it with a simple response, there may be cases where you have to hide the item that you really want to see (display it in a column).

In such a case, add the following code to functions.php of the enabled theme and adjust it.

/***** Set the title width of the post list to 400px *****/
function admin_title_width(){
echo '<style>
	.posts .column-title {
	width: 400px;
}</style>';
	
}
add_action('admin_head','admin_title_width');

The above code is for specifying the width only for the column of the title of the post list. Change the width specification of 400px in the code to any value and adjust it so that it feels good (you can also use the relative value “○%” for the width).

This may cause other columns to become vertically long, but this is different for each site, so please adjust it in combination with a simple measure.

.. .. It’s too easy to deal with, so I’ll explain the code a little more.

First, since the design element (CSS) on the management screen side is separated from the design element of the front end (screen displayed to the visitor), the additional CSS of the theme customizer and the style of the child theme (parent theme). Even if it is added to css, it is not basically reflected.

Therefore, in order to properly reflect the design only on the management screen side (conversely, it does not affect the front end at all), the admin_head function is used to output and reflect it to the source on the management screen side.

Also, in the above code, it is limited to “posts” and it affects only “list of posts or custom post types”, so if you want to make the same width in the list of fixed pages, describe “.posts”. You can remove or change the “.posts .column-title” part to “.posts .column-title, .pages .column-title”, or use the code for the fixed page below.

/***** Set the title width of the fixed page list to 400px *****/
function admin_page_title_width(){
echo '<style>
	.pages .column-title {
	width: 400px;
}</style>';
	
}
add_action('admin_head','admin_page_title_width');

Post Author: