【问题标题】:Remove Category Description on Woocommerce Category Listing Page (Admin Area)删除 Woocommerce 类别列表页面(管理区域)上的类别描述
【发布时间】:2014-05-19 00:08:13
【问题描述】:

如何从 woocommerce 的类别列表页面中删除类别描述。我不想删除添加描述功能,我会使用它,而只是从类别列表中删除它(在管理区域),因为我有很多很长的描述,而且看起来不太好列表中包含的描述。一直在谷歌上搜索这个,不幸的是没有运气。

提前致谢。

【问题讨论】:

    标签: wordpress woocommerce


    【解决方案1】:

    同时删除 woocommerce 和 wordpress 默认类别列表页面

    /*========== Remove Category Column on Wordpress Category Listing Page ==========*/
    function cap_remove_category_desc_cat_listing($columns)
    {
    // only edit the columns on the current taxonomy
    if ( !isset($_GET['taxonomy']) || ($_GET['taxonomy'] != 'category' && $_GET['taxonomy'] != 'product_cat') )
        return $columns;
    
    // unset the description columns
    if ( $posts = $columns['description'] ){ unset($columns['description']); }
    
    return $columns;
    }
    add_filter('manage_edit-category_columns','cap_remove_category_desc_cat_listing');
    add_filter('manage_edit-product_cat_columns','cap_remove_category_desc_cat_listing');
    

    【讨论】:

      猜你喜欢
      • 2019-12-14
      • 2014-11-06
      • 1970-01-01
      • 1970-01-01
      • 2017-12-15
      • 1970-01-01
      • 2021-08-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多