0
我使用WordPress插件https://github.com/lesterchan/wp-postratings。 它還顯示管理員的評級,當我訪問http://domain.com/wp-admin/edit.php。 如何從管理員端刪除這些評分。從管理端刪除Wordpress插件功能
我使用WordPress插件https://github.com/lesterchan/wp-postratings。 它還顯示管理員的評級,當我訪問http://domain.com/wp-admin/edit.php。 如何從管理員端刪除這些評分。從管理端刪除Wordpress插件功能
您可以在manage_posts_columns過濾器的functions.php文件中使用以下函數。我假設您的自定義帖子類型ID爲'tools',並且該列由'ratings'引用。如果它們不同,你可以在代碼中改變它。
add_filter('manage_posts_columns', 'custom_post_columns', 10, 2);
function custom_post_columns($columns, $post_type) {
switch ($post_type) {
//assuming the id for the custom post type is 'tools'
case 'tools':
unset(
//I'm using 'ratings' but you'll have to check and see what the name for the column really is.
$columns['ratings']
);
break;
}
return $columns;
}