Dokan category widget on seller store
Viewing 3 Posts - 1 through 3 (of 3 total)
Author | Posts |
---|---|
November 24, 2014 at 4:02 pm 31070 | |
towhid | hello, on my WC category i have some hidden slugs = hidden products category (customer can't see it) i have a theme function to do that /*-------------------------------------------------------------------------------------------------- Don't show Catagories - --------------------------------------------------------------------------------------------------*/ add_filter( 'get_terms', 'get_subcategory_terms', 10, 3 ); function get_subcategory_terms( $terms, $taxonomies, $args ) { $new_terms = array(); // if a product category and on the shop page if ( in_array( 'product_cat', $taxonomies ) && ! is_admin() ) { foreach ( $terms as $key => $term ) { if ( ! in_array( $term->slug, array( 'xxxx' ) ) ) if ( ! in_array( $term->slug, array( 'xxxxx' ) ) ) if ( ! in_array( $term->slug, array( 'xxxx' ) ) ) if ( ! in_array( $term->slug, array( 'xxxxx' ) ) ) if ( ! in_array( $term->slug, array( 'xxxxxx' ) ) ) { $new_terms[] = $term; } } $terms = $new_terms; } return $terms; } -------------------------------------------------------------------------------------------------- in dokan category widget on seller store this slugs are not hidden, please can you help me to fix this ? thanks Stéphane |
November 25, 2014 at 2:46 pm 31152 | |
towhid | Hello Stephane, Can you specify form where your hidden the category? Is it from Admin’s Dashboard Category Panel or did you create any function? If it from any function what you create please provide me. Thank You. 🙂 |
November 26, 2014 at 7:06 pm 31257 | |
stephane | This reply has been marked as private. |
December 4, 2014 at 6:14 pm 31848 | |
towhid | Hello Stephane, Sorry for late reply. Please allow us some time. This code function will work or not after testing I will let you know. Thank You 🙂 |
Viewing 3 Posts - 1 through 3 (of 3 total)