' . esc_html__( 'All', 'eleganto' ) . '';
if ( $count > 0 ) {
foreach ( $terms as $term ) {
$termname = strtolower( $term->name );
$termname = str_replace( ' ', '-', $termname );
echo '- ' . esc_html( $term->name ) . '
';
}
}
?>
'portfolio',
'posts_per_page' => absint( get_theme_mod( 'portfolio_section_number_posts', 8 ) )
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
$terms = get_the_terms( $post->ID, 'portfolio_category' );
if ( $terms && !is_wp_error( $terms ) ) :
$links = array();
foreach ( $terms as $term ) {
$links[] = $term->name;
}
$tax_links = join( " ", str_replace( ' ', '-', $links ) );
$tax = strtolower( $tax_links );
else :
$tax = '';
endif;
?>
-