最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

how to remove thumbnail and LiteSpeed Optimization column in media library list-view?

programmeradmin1浏览0评论

I've searched on the internet, and found out this code from this link

function remove_upload_columns($defaults) {
  unset($defaults['comments']);
  unset($defaults['author']);
  return $defaults;
}
add_filter('manage_upload_columns', 'remove_upload_columns');

I put the code into functions.php child theme.
It worked, now the Media Library doesn't have author column.

Since I want to remove the "Uploaded to" column also, so I add this line to the code above:

unset($defaults['uploaded to']);

but it didn't work. The "Uploaded to" column in the Media Library still there.
I've tried to change it into uploaded_to, uploaded-to and uploaded_to, no luck.
The same thing with LiteSpeed Optimization column, no luck.

The other thing is I also want to remove the thumbnail under "File" column.
My WordPress version is 5.6.2

Any kind of help would be greatly appreciated.
Thank you in advanced.

发布评论

评论列表(0)

  1. 暂无评论