Skip to content

Instantly share code, notes, and snippets.

@kilbot
Created April 29, 2018 05:24
Show Gist options
  • Save kilbot/9c9729ca1ac7cccb537be6d0d400f958 to your computer and use it in GitHub Desktop.
Save kilbot/9c9729ca1ac7cccb537be6d0d400f958 to your computer and use it in GitHub Desktop.
Custom product tabs
<?php
// place this in your theme functions.php file
function my_custom_pos_tabs($params){
$params['tabs'] = array(
'all' => array(
'label' => __( 'All', 'woocommerce'),
'active' => true
),
'music' => array(
'label' => 'Music',
'id' => 'cat:music'
),
'posters' => array(
'label' => 'Posters',
'id' => 'cat:posters'
)
);
return $params;
}
add_filter('woocommerce_pos_params', 'my_custom_pos_tabs');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment