Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <aside id="more_from" class="span2">
- Some projects from <br />
- <?php
- $service_type = (get_the_term_list( $post->ID, 'service' ));
- ?>
- <span class="btn btn-info btn_white_text btn-mini"><?php echo $service_type; ?></span><br />
- <!-- pull other items in the current section -->
- <?php
- $t_args = array (
- 'tax_query' => array (
- array (
- 'orderby' => 'rand',
- 'post_type' => 'portfolio',
- 'taxonomy' => 'service',
- 'field' => 'slug',
- 'terms' => $service_type,
- 'post__not_in' => array($post->ID)
- )
- )
- );
- $query = new WP_Query( $t_args );
- if( $query->have_posts() ) {
- while ( $query->have_posts() ) : $query->the_post();
- // output your stuff
- echo '<div class="more_from_thumb"><a href="';
- the_permalink();
- echo '">';
- the_post_thumbnail('tiny_thumb');
- echo '</a></div>';
- endwhile;
- wp_reset_query();
- } ?>
- </aside> <!--#more_from-->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement