Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- query_posts(array(
- 'posts_per_page' => '10',
- 'orderby' => 'rand',
- 'post_type' => 'katalogas',
- ));
- if (have_posts()) : while (have_posts()) : the_post();
- ?>
- <?php
- $tags = wp_get_post_tags($post->ID);
- $count=0; $sep='';
- if ($tags) {
- foreach($tags as $tag) {
- $count++;
- echo '<a href="' . get_term_link( $tag, 'post_tag' ) . '" title="' . sprintf( __( "View all posts in %s" ), $tag->name ) . '" ' . '><span>'. $tag->name.'</span></a>';
- if( $count > 0 ) break; //change the number to adjust the count
- }
- }
- ?>
- <? endwhile; ?>
- <? endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement