Sto diventando matto!!!!
codice:
wp_list_categories( array(
'orderby' => 'name',
'exclude' => array( 17 ),
'include' => array ( 12, 13, 16, 14, 10, 15, 11, 9 ),
'title_li' => '' . __( ' ', 'textdomain' ) . ''
) );
è quello che devo fare ma le mette in verticale.
Questa fa la stessa cosa me le mette in orizzontale divise da virgole ma non capisco come devo fare per inserire exclude... che è quello che mi serve!!!
codice:
$taxonomy = 'category';
// Get the term IDs assigned to post.
$post_terms = wp_get_object_terms( $post->ID, $taxonomy, array( 'fields' => 'ids' ) );
// Separator between links.
$separator = ', ';
if ( ! empty( $post_terms ) && ! is_wp_error( $post_terms ) ) {
$term_ids = implode( ',' , $post_terms );
$terms = wp_list_categories( array(
'title_li' => '',
'style' => 'none',
'echo' => false,
'taxonomy' => $taxonomy,
'include' => $term_ids,
) );
$terms = rtrim( trim( str_replace( '<br />', $separator, $terms ) ), $separator );
// Display post categories.
echo $terms;
}