Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $portquery = array( 'post_type' => 'portfolio', 'posts_per_page' => 5 );
- $portfeature = new WP_Query($portquery);
- ?>
- <ul class="grid cs-style carousel elastislide-list">
- <?php while ($portfeature->have_posts()) : $portfeature->the_post(); ?>
- <?php if ( has_post_thumbnail() ) : ?>
- <li>
- <figure>
- <?php $imgurl = wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>
- <a href="<?php echo $imgurl; ?>" title="<?php printf( __('Permalink to %s', 'zanoi'), the_title_attribute('echo=0') ) ?>" rel="lightbox" class="thumb"><?php the_post_thumbnail('thumbnail'); ?></a>
- <figcaption>
- <h3><?php the_title(); ?></h3>
- <span>
- <?php printf( __( '<span aria-hidden="true" class="icon-folder"></span> %s', 'zanoi' ), get_the_category_list(', ') ) ?>
- </span>
- <a href="<?php the_permalink(); ?>" class="more"><?php _e( 'Read More', 'zanoi' ) ?></a>
- </figcaption>
- </figure>
- </li>
- <?php endif; ?>
- <?php endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement