Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $tour_types = get_terms( 'tour_type', 'orderby=name&hide_empty=1' ); $count = count($tour_types); if ( $count > 0 ){ foreach ( $tour_types as $tour_type ) { ?>
- <li><a href="<?php bloginfo('url');?>/tours/type/<?php echo $tour_type->slug; ?>">
- <!-- -->
- <?php $tax = $tour_type->slug; ?>
- <?php $args = array( 'numberposts' => 1, 'tour_type'=> $tax ); $postslist = get_posts( $args ); foreach ($postslist as $post) : ?>
- <img src="<?php bloginfo('template_url'); ?>/assets/i/plane-test.png" alt="<?php the_title(); ?>">
- <?php endforeach; ?>
- <!-- -->
- <?php echo $tour_type->name; ?>
- </a></li>
- <?php }} ?>
Add Comment
Please, Sign In to add comment