Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 23rd, 2012  |  syntax: None  |  size: 1.69 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. /*
  3. Template Name Posts: Fullwidth
  4. */
  5.  
  6. $k_option['custom']['bodyclass'] = "class='fullwidth'"; //$k_option['custom']['bodyclass'] = "";
  7. get_header(); ?>
  8.  
  9.  
  10.                 <div id="main">
  11.                         <div id="content">
  12.                        
  13.                                 <?php if (have_posts()) : while (have_posts()) : the_post(); // start loop
  14.                         // THIS PAGE CAN ONLY DISPLAY FULLWIDTH PREVIEW PICTURES (940px * 420px)
  15.                        
  16.                        
  17.                         //check if we got a previe picture, and which one should be taken (image resizing with "tim thumb" on? then we can take the big one and resize it)
  18.                         $preview_big = get_post_meta($post->ID, "_preview_big", true);
  19.                         $preview_medium = get_post_meta($post->ID, "_preview_medium", true);
  20.                        
  21.                         //defaults:
  22.                         $preview = $preview_big;
  23.                         $lightbox = '';
  24.                         $link = false;
  25.                         $link_url = $preview_big;
  26.                        
  27.                         if (!kriesi_is_file($preview_big,'image')) {$preview = $preview_medium;}
  28.                        
  29.                         // the kriesi_build_image function used here checks if the image should be resized.
  30.                         // the function is located in framework/helper_functions
  31.                         $preview = kriesi_build_image(array('url'=>$preview,'height'=>'420','width'=>'940','lightbox'=>$lightbox,'link'=>$link));                      
  32.                         ?>             
  33.                                 <div class='entry'>
  34.                                         <?php echo $preview; ?>
  35.                                 <h2><a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
  36.                                         <?php
  37.                                         the_content(); ?>
  38.                                         <?php edit_post_link('Edit', '', ''); ?>
  39.                                 </div><!--end entry-->
  40.                                 <?php endwhile; else: ?>
  41.                                 <p>Sorry, no posts matched your criteria.</p>
  42.                         <!--do not delete-->
  43.                         <?php endif; ?>
  44.        
  45.                         </div><!-- end content -->
  46.                        
  47. <?php get_sidebar(); ?>                
  48.                
  49.                 </div><!--end main-->
  50.  
  51. <?php get_footer();  ?>