admin管理员组

文章数量:1388126

there is something strange happening on my site. I have in Posts section column called post_views which isn't created by any plugin and it is also undeletable. I've tried searching column name in database and no results found. I've also tried disabling plugins and themes one by one and it's still there.

I've also tried unset it with manage_posts_columns hook and it didn't work.

add_filter('manage_posts_columns', array($this, 'remove_columns'));     
function remove_columns($columns) {
    unset( $columns['post_views'] );
    return $columns;
}

Then i tried to var_dump($columns) and found out, that there's no column called post_views. I've also used third party plugin like Admin Columns to get rid off it, but that also doesn't work. And then I tried to re-install Wordpress in hopes of getting restored values and that didn't work either. I'm out of ideas...

Could someone please tell me where are column values stored and how can I get rid of post_views? Thanks!

there is something strange happening on my site. I have in Posts section column called post_views which isn't created by any plugin and it is also undeletable. I've tried searching column name in database and no results found. I've also tried disabling plugins and themes one by one and it's still there.

I've also tried unset it with manage_posts_columns hook and it didn't work.

add_filter('manage_posts_columns', array($this, 'remove_columns'));     
function remove_columns($columns) {
    unset( $columns['post_views'] );
    return $columns;
}

Then i tried to var_dump($columns) and found out, that there's no column called post_views. I've also used third party plugin like Admin Columns to get rid off it, but that also doesn't work. And then I tried to re-install Wordpress in hopes of getting restored values and that didn't work either. I'm out of ideas...

Could someone please tell me where are column values stored and how can I get rid of post_views? Thanks!

Share Improve this question asked May 8, 2020 at 11:56 Jan RadostaJan Radosta 1
Add a comment  | 

1 Answer 1

Reset to default 0

WordPress does not could post views, and never has.

This has to be added by a plugin or your theme to appear. Even if the counts remain in the database after deactivating the responsible theme or plugin, the column could not appear without the it being active.

Make sure you've deactivated every plugin, even if you don't think it's the culprit, and try activating a default theme (eg. Twenty Twenty). Also check wp-content/mu-plugins for a "must-use" plugin. These cannot be deactivated and will always run if it is a file in that directory.

If none of that works then somebody has been editing your WordPress install. Do a manual update to make sure you have a clean install.

本文标签: pluginsUndeletable column in Posts