Advertisement
Guest User

Home Page Template

a guest
May 4th, 2012
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.49 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Homepage
  4. */
  5.  
  6. get_header(); ?>
  7.  
  8. <div class="inner">
  9.                        
  10.    
  11.     <?php
  12.     if(get_option_tree('slider_enable'))
  13.     {  
  14.         include 'includes/slider.php';
  15.     }
  16.    
  17.     $homepage_cc = get_option_tree('homepage_cc');
  18.    
  19.     if($homepage_cc)
  20.     {
  21.         echo $homepage_cc;
  22.         echo '<div class="divider line"></div>';
  23.     }  
  24.     ?>    
  25.    
  26.     <?php homepage_tagline(); ?>
  27.    
  28.     <?php if(get_option_tree('recent_work')){  ?>
  29.     <div id="recent-work" class="home-section">
  30.         <h3>Featured Content</h3>  
  31.         <?php $count = strtolower((str_replace (" ", "", get_option_tree('recent_work_st'))));
  32.             if($count == "fourcolumns"){
  33.                 $query_count = 4;
  34.                 $width = 198;
  35.                 $height = 130;
  36.             }else{
  37.                 $query_count = 3;
  38.                 $width = 270;
  39.                 $height = 190;
  40.             }
  41.         ?>
  42.         <ul class="<?php echo $count; ?>">
  43.        
  44.             <?php query_posts('post_type=portfolio&posts_per_page='.$query_count); if (have_posts()) : while (have_posts()) : the_post();   ?>                    
  45.             <li>
  46.                 <a href="<?php the_permalink(); ?>" class="over">
  47.                     <span><?php the_title(); ?></span>
  48.                     <p><?php portfolio_desc_limited(); ?></p>
  49.                 </a>
  50.                 <a href="<?php the_permalink(); ?>"><img src="<?php post_thumb($width, $height); ?>" alt>   </a>
  51.             </li>
  52.             <?php endwhile; endif; wp_reset_query(); ?>                    
  53.            
  54.         </ul>
  55.        
  56.         <div class="clear"></div>
  57.        
  58.     </div>    
  59.    
  60.     <div class="divider line"></div>
  61.     <?php } ?>
  62.      
  63.     <div class="content content_right">
  64.    
  65.     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>        
  66.            
  67.         <div class="post">
  68.             <?php if(get_post_meta($post->ID, 'pp_image-1', true)){ ?>
  69.             <div class="post-image">
  70.                 <a href="<?php the_permalink(); ?>"><img src="<?php post_thumb(662, 220); ?>" alt></a>
  71.             </div>
  72.             <?php } ?>
  73.             <div class="post-content">
  74.                 <div class="post-info">
  75.                     <span class="date"><p class="bold"><?php the_time('M d'); ?></p><?php the_time('Y'); ?></span>
  76.                     <span class="comments-nr"><a href="<?php the_permalink(); ?>#comments"><p class="bold"><?php comments_number('0','1','%'); ?></p> <?php tr_translate(comments); ?></a></span>
  77.                     <p><span><?php tr_translate(by); ?></span> <?php the_author_posts_link(); ?></p>
  78.                     <p><span><?php tr_translate(in); ?></span> <?php the_category(', '); ?></p>
  79.                     <?php post_tags(); ?>
  80.                 </div>
  81.                 <div class="post-entry">
  82.                     <h1 class="title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1>
  83.                     <?php the_content(get_option_tree(tr_read_more).' ?'); ?>                    
  84.                 </div>
  85.             </div>
  86.         </div>
  87.            
  88.     <?php endwhile;
  89.  
  90. # Archive doesn't exist:
  91. else :
  92.  
  93.     get_header(); ?>
  94.     <h2><?php _e('No posts found.') ?></h2>
  95.     <p><?php _e('Sorry, no posts matched your criteria.') ?></p>
  96. <?php
  97. endif; ?>
  98.    
  99.     <?php include TEMPLATEPATH . '/includes/blog-pagination.php'; ?>
  100.        
  101.     </div><!-- .content End -->
  102.     <!-- Content End -->
  103.    
  104.     <?php include TEMPLATEPATH . '/templates/sidebar/sidebar-left.php'; ?>  
  105.  
  106.    
  107.     <!--Begin Homepage Content-->
  108.    
  109.    
  110.                
  111. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement