Need to limit number of tags displayed
-
Page I am trying to update can be viewed here
I have setup taxomony as my services on projects. I display them in a list get by this<?php $taxonomy = 'my_services'; $terms = get_the_terms( $post->ID , 'mytags' ); if ( !empty( $terms ) ) : echo '<ul>'; foreach ( $terms as $term ) { $link = get_term_link( $term, $taxonomy ); if ( !is_wp_error( $link ) ) echo '<li class="' . $term->slug. '"><a href="' . $link . '" rel="tag">' . $term->name . '</a></li>'; } echo '</ul>'; endif; ?>
I basically want to limit the number of tags display on the index of this page just like the excerpt does for content.
THen I can show the full list inside the single page.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Need to limit number of tags displayed’ is closed to new replies.