Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php query_posts('category_name=movies&posts_per_page=10&meta_key=post_expiration&orderby=meta_value&order=ASC');
- if (have_posts()) :
- while (have_posts()) : the_post();
- $expirationtime = get_post_custom_values('post_expiration');
- $featured_event_info = get_post_meta($post->ID, 'date_range', true);
- $featured_event_title = get_post_meta($post->ID, 'short_title', true);
- if (is_array($expirationtime)) {
- $expirestring = implode($expirationtime);
- }
- $secondsbetween = strtotime($expirestring)-time();
- if ( $secondsbetween > 0 ) { ?>
- <div id="post-<?php the_ID();?>" class="movie-blog-content">
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
- <h2><?php echo $featured_event_title; ?></h2>
- <p><?php echo $featured_event_info; ?></p>
- <?php if (has_post_thumbnail( $post->ID )): ?>
- <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), ‘full’ ); ?>
- <div class="movie-blog-img"><img src="<?php echo site_url(); ?>/scripts/timthumb.php?src=<?php echo $image[0]; ?>&w=160&h=200&zc=1" /></div>
- <?php endif; ?>
- </a>
- </div><!-- .movie-blog-content -->
- <?php }
- endwhile;
- endif;
- ?>
Add Comment
Please, Sign In to add comment