Cosa stai cercando?
CATEGORIA NASCOSTA.
PER MOSTRARE CATEGORIA ANDARE IN
/public_html/wp-content/themes/barberry/functions.php
scendere alla fine del file ed eliminare (dopo riga end if;)
“function woo_hide_categories_ids( $terms, $taxonomies, $args ) {
$new_terms = array();
$hide_category = array( 23 ); // ID della categoria da nascondere
// se sta looppando la categoria o la pagina shop
if ( in_array( ‘product_cat’, $taxonomies ) && !is_admin() && is_shop() ) {
foreach ( $terms as $key => $term ) {
if ( ! in_array( $term->term_id, $hide_category ) ) {
$new_terms[] = $term;
}
}
$terms = $new_terms;
}
return $terms;
}
add_filter( ‘get_terms’, ‘woo_hide_categories_ids’, 10, 3 );“
Cosa stai cercando?