In any WooCommerce store, there are two major taxonomy options: categories and tags. Product tags are like product categories, but there is no hierarchy in tags. This means that there are no ‘subtags’. For example, if you are selling clothes and have many checked prints, you can tag for ‘checked’.
However, the “product_tag” taxonomy is something that we rarely need to use in our WooCommerce store. When you are not using it, you can easily remove it to keep the admin interface clean. If your WordPress Admin is cluttered, it decreases the usability, and things that do not work can confuse even technical users.
WooCommerce Storefront Theme Hide Tags
In this brief tutorial, I will share some code snippets that you can use to hide product tags. However, before doing anything from this tutorial, please go to Products > Tags and make sure that no tags are there.
Steps to Hide “All Products > Tags” Link from Admin Menu
Here is the link I am going to remove:
Here are the steps that you need to follow:
- Log into your WordPress site and access the Dashboard as the admin user.
- From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file to add the function to hide the “All Products > Tags” link from the admin menu.
- Add the following code to the PHP file:
/** * Hide “All Products > Tags” Link from Admin Menu */ add_action( 'admin_menu', 'njengah_hide_product_tags_admin_menu', 9999 ); function njengah_hide_product_tags_admin_menu() { remove_submenu_page( 'edit.php?post_type=product', 'edit-tags.php?taxonomy=product_tag&post_type=product' ); }
Steps to Remove Product Tags Metabox
If you go to any product’s edit page, you will find the “Product tags” meta box, similar to WordPress “Tags” meta box. You need to remove it because it allows you to choose from available tags and create new ones.
You can use CSS to hide it in the Screen Options, but it is not enough. Here are the steps that you need to follow:
- Log into your WordPress site and access the Dashboard as the admin user.
- From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file to add the function to remove the product tags meta box.
- Add the following code to the PHP file:
/** * Remove Product Tags Metabox */ add_action( 'admin_menu', 'njengah_hide_product_tags_metabox' ); function njengah_hide_product_tags_metabox() { remove_meta_box( 'tagsdiv-product_tag', 'product', 'side' ); }
Steps to Remove Tags Column from All Products Page
This is the column that I am going to remove:
Here are the steps that you need to follow:
- Log into your WordPress site and access the Dashboard as the admin user.
- From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file to add the function to remove the tags column from all products page.
- Add the following code to the PHP file:
/** * Remove Product Tags Metabox */ add_filter('manage_product_posts_columns', 'njengah_hide_product_tags_column', 999 ); function njengah_hide_product_tags_column( $product_columns ) { unset( $product_columns['product_tag'] ); return $product_columns; }
Steps to Remove Product Tags Text Area from Quick Edit and Bulk Edit
Here is what we are going to change:
Here are the steps that you need to follow:
- Log into your WordPress site and access the Dashboard as the admin user.
- From the Dashboard menu, click on Appearance Menu > Theme Editor Menu. When the Theme Editor page is opened, look for the theme functions file to add the function to remove product tags text area from quick edit and bulk edit.
- Add the following code to the PHP file:
/** * Remove Product Tags Text Area from Quick Edit and Bulk Edit */ add_filter( 'quick_edit_show_taxonomy', 'njengah_hide_product_tags_quick_edit', 10, 2 ); function njengah_hide_product_tags_quick_edit( $show, $taxonomy_name ) { if ( 'product_tag' == $taxonomy_name ) $show = false; return $show; }
Conclusion
This brief tutorial has highlighted that WooCommerce has two major taxonomy options: categories and tags. Additionally, I have emphasized that no hierarchy in tags.
Moreover, I have shared how you can safely remove product tags in WooCommerce. I started by first removing the “All Products > Tags” link from the admin menu.
After that, I removed the product tag meta box. Removing it is critical because it allows you to choose from available tags and create new ones.
In the next section, I shared a PHP code snippet to remove the product tags column in the All Products page. Additionally, I have shared a PHP code snippet to remove the product tags text area from the Quick Edit and Bulk Edit.
Similar Articles
- Hide or Remove the Quantity Field from WooCommerce Product Page
- How to Auto Approve Orders in WooCommerce
- How to Add Product Image WooCommerce Checkout Page
- How to Sort WooCommerce Categories for Better User Experience
- How to Change Storefront Number of Products Per Row
- How to Use WooCommerce Product Attributes Step by Step [Complete Guide]
- How to Hide All Products From Shop Page in WooCommerce
- How to Put WooCommerce Cart and Checkout on One Page
- How to Remove Breadcrumbs WooCommerce Storefront
- How to Remove Search Box Storefront Theme
- How to Hide Add to Cart Button in WooCommerce
- How to Change Font Size WooCommerce Storefront Theme
- How to Remove Cart from Storefront Theme Header
- How to Change Products per Page WooCommerce Storefront Theme
- How to Display WooCommerce Products By Category
- How to Change Button Color Storefront Theme
- How to Rename Order Status Messages in WooCommerce
- How to Remove Page Title WooCommerce Storefront Theme
- How to Add Categories to WooCommerce Products
- How to Hide Category WooCommerce Storefront Theme
Comments are closed.