Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php /*
- Template Name: Home Page - first layout
- */ ?>
- <?php get_header(); ?>
- <div id="content">
- <?php while (have_posts ()) : the_post(); ?>
- <div <?php post_class(); ?>>
- <?php the_content(); ?>
- <?php the_more(); ?>
- <div class="linebreak"></div>
- </div><!-- end post -->
- <?php endwhile; ?>
- <?php if (get_option_tree('folios', '')) : ?>
- <div class="recent-posts">
- <?php
- query_posts(array('post_type' => 'portfolio', 'post__in' => get_option_tree('folios', '', false, true), 'showposts' => -1));
- global $more;
- $more = 0;
- if (have_posts ()) : while (have_posts ()) : the_post(); ?>
- <div class="portfolio-item home">
- <div class="thumbnail">
- <?php
- $images = get_post_meta(get_the_ID(), 'rw_screenshot', false);
- $video_lightbox = get_post_meta(get_the_ID(), 'rw_pvideo_lightbox', true);
- $lo = wp_get_attachment_image_src(get_post_meta(get_the_ID(), 'rw_screenshot', true), 'home-portfolio-3col');
- $lo_lb = wp_get_attachment_image_src(get_post_meta(get_the_ID(), 'rw_screenshot', true), 'Large');
- $thb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'home-portfolio-3col', false, '' );
- if ($video_lightbox != NULL && $lo != NULL) {
- echo '<a href="'.the_permalink().'"><img src="' . $lo[0] . '" /><span> </span></a>';
- } else if ($video_lightbox != NULL && $lo == NULL) {
- echo '<a href="'.the_permalink().'"><img src="'.$thb[0].'" /><span> </span></a>';
- } else if ($video_lightbox == NULL && $lo != NULL) {
- echo '<a href="'.the_permalink().'"><img src="' . $lo[0] . '" /><span> </span></a>';
- }
- ?>
- </div>
- <div class="excerpt">
- <h3>
- <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
- <?php echo content(6); ?>
- </div>
- <?php the_more(); ?>
- </div><!-- end portfolio-item -->
- <?php endwhile; ?>
- </div>
- <div class="linebreak"></div>
- <?php endif;endif;
- wp_reset_query();
- ?>
- <?php if (get_option_tree('recent_pages', '')) : ?>
- <div class="recent-pages">
- <?php
- query_posts(array('post_type' => 'page', 'post__in' => get_option_tree('recent_pages', '', false, true), 'showposts' => -1));
- global $more;
- $more = 0;
- ?>
- <?php $count = 0; ?>
- <?php $i = 0;
- if (have_posts ()) : while (have_posts ()) : the_post(); ?>
- <?php if ($count % 3 == 2) {
- ?>
- <div class="home-item last">
- <h3>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
- <?php } else {
- ?>
- <div class="home-item">
- <h3>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
- <?php } ?>
- <?php
- $images = get_post_meta(get_the_ID(), 'rw_icon', false);
- foreach ($images as $att) {
- $src = wp_get_attachment_image_src($att, 'minimal');
- $src = $src[0];
- if (isset($src)) {
- ?>
- <div class="icon">
- <img src="<?php echo $src ?>" alt="<?php the_title(); ?>" />
- </div>
- <?php
- $i++;
- if ($i > 0)
- break;
- }
- }
- ?>
- <?php $meta = get_post_meta(get_the_ID(), 'rw_fidescription', true); { ?>
- <p><?php echo $meta; ?></p>
- <?php } ?>
- <a class="gotopage" href="<?php the_permalink(); ?>">>></a>
- </div>
- <?php if ($count % 3 == 2) {
- ?>
- <div class="linebreak nospace"></div>
- <?php } ?>
- <?php
- $count++;
- $i++;
- endwhile; ?>
- </div>
- <div class="linebreak"></div>
- <?php endif;
- endif;
- wp_reset_query();
- ?>
- <?php if (get_option_tree('recent_posts', '')) : ?>
- <div class="recent-posts">
- <?php
- query_posts(array('post_type' => 'post', 'post__in' => get_option_tree('recent_posts', '', false, true), 'showposts' => -1));
- global $more;
- $more = 0;
- ?>
- <?php $count = 0; ?>
- <?php $i = 0;
- if (have_posts ()) : while (have_posts ()) : the_post(); ?>
- <?php if ($count % 3 == 2) {
- ?>
- <div class="home-item last">
- <?php } else {
- ?>
- <div class="home-item">
- <?php } ?>
- <?php if (has_post_thumbnail ()) : ?>
- <div class="thumbnail link">
- <a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
- <?php the_post_thumbnail('home-posts'); ?>
- <span class="ov"> </span>
- </a>
- </div>
- <?php endif; ?> <div class="post-excerpt">
- <h3>
- <a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?>
- </a>
- </h3>
- <p class="date"><?php the_time('M j, Y'); ?></p>
- <?php echo content(14); ?>
- <?php the_more(); ?>
- </div>
- </div>
- <?php
- $count++;
- $i++;
- endwhile; ?>
- </div>
- <?php endif;
- endif;
- ?></div>
- </div><!-- end content -->
- <?php get_footer(); ?>
Add Comment
Please, Sign In to add comment