如何调整 WooCommerce 管理产品的列大小 table
How to adjust the column size of WooCommerce admin products table
我在我的 WooCommerce 管理产品列表中添加了一些额外的列,但是这些列没有根据值进行调整,我遇到了以下问题
如何更改 table
的 CSS
table.fixed {
table-layout: fixed;
}
add_action('admin_enqueue_scripts', 'wc_product_list_css_overrides');
function wc_product_list_css_overrides() {
wp_add_inline_style('woocommerce_admin_styles',
"table.wp-list-table .column-sku{ width: 9%; } table.wp-list-table .column-name{ width: 20%; } table.wp-list-table .column-is_in_stock{ width: 7%; }");
}
请取相应的列名,并像给定的示例一样输入所需的宽度值。
在您的活动主题functions.php文件中添加以上代码
我在我的 WooCommerce 管理产品列表中添加了一些额外的列,但是这些列没有根据值进行调整,我遇到了以下问题
如何更改 table
的 CSStable.fixed {
table-layout: fixed;
}
add_action('admin_enqueue_scripts', 'wc_product_list_css_overrides');
function wc_product_list_css_overrides() {
wp_add_inline_style('woocommerce_admin_styles',
"table.wp-list-table .column-sku{ width: 9%; } table.wp-list-table .column-name{ width: 20%; } table.wp-list-table .column-is_in_stock{ width: 7%; }");
}
请取相应的列名,并像给定的示例一样输入所需的宽度值。
在您的活动主题functions.php文件中添加以上代码