Advertisement
towfiqi

blog page

Apr 28th, 2012
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.35 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: Blog Page
  4. */
  5. ?>
  6.  
  7. <?php get_header(); ?>
  8.  
  9.  
  10.  
  11. <!--LATEST POSTS-->
  12.  
  13. <div class="lay1">
  14. <div class="lay1_wrap">
  15.                    <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
  16. query_posts("showposts=6&category_name=blog&paged=$page");
  17. while ( have_posts() ) : the_post() ?>
  18.                 <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  19.                
  20.                 <div class="post_content">
  21.                     <h2 class="postitle"><a href="<?php the_permalink();?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  22.                     <?php znn_excerpt('znn_excerptlength_index', 'znn_excerptmore'); ?>
  23.                    
  24.                 </div>
  25.  
  26.                <?php if ( znn_get_custom_field_value('videolink') != "") { ?>
  27.                  <div class="imgwrap">
  28.                     <object width="284" height="200">
  29.                       <param name="movie"
  30.                              value="https://www.youtube.com/v/v-<?php znn_get_custom_field_value('videolink', true); ?>?version=3&autohide=1&showinfo=0"></param>
  31.                       <param name="allowScriptAccess" value="always"></param>
  32.                       <embed src="https://www.youtube.com/v/v-<?php znn_get_custom_field_value('videolink', true); ?>?version=3&autohide=1&showinfo=0"
  33.                              type="application/x-shockwave-flash"
  34.                              allowscriptaccess="always"
  35.                              width="284" height="200"></embed>
  36.                     </object>
  37.                 </div>              
  38.                <?php } else { ?>
  39.            
  40.                 <div class="post_image">
  41.                      <!--CALL TO POST IMAGE-->
  42.                     <?php if ( has_post_thumbnail() ) : ?>
  43.                     <div class="imgwrap">
  44.  
  45.                         <div class="date_meta"><?php the_time('d'); ?><?php the_time('S'); ?> <?php the_time('M'); ?></div>
  46.                         <div class="block_comm"><?php if (!empty($post->post_password)) { ?>
  47.                 <?php } else { ?><div class="comments"><?php comments_popup_link( __('0</br>Comment', 'zenon'), __('1</br>Comment', 'zenon'), __('%</br>Comments', 'zenon'), '', __('Off' , 'zenon')); ?></div><?php } ?></div>
  48.  
  49.                        
  50.                     <a href="<?php the_permalink();?>"><?php the_post_thumbnail('medium'); ?></a></div>
  51.                    
  52.                     <?php elseif($photo = znn_get_images('numberposts=1', true)): ?>
  53.    
  54.                     <div class="imgwrap">
  55.  
  56.                         <div class="date_meta"><?php the_time('d'); ?><?php the_time('S'); ?> <?php the_time('M'); ?></div>
  57.                         <div class="block_comm"><?php if (!empty($post->post_password)) { ?>
  58.                 <?php } else { ?><div class="comments"><?php comments_popup_link( __('0</br>Comment', 'zenon'), __('1</br>Comment', 'zenon'), __('%</br>Comments', 'zenon'), '', __('Off' , 'zenon')); ?></div><?php } ?></div>
  59.  
  60.                        
  61.                     <a href="<?php the_permalink();?>"><?php echo wp_get_attachment_image($photo[0]->ID ,'medium'); ?></a></div>
  62.                
  63.                     <?php else : ?>
  64.                    
  65.                     <div class="imgwrap">
  66.  
  67.                         <div class="date_meta"><?php the_time('d'); ?><?php the_time('S'); ?> <?php the_time('M'); ?></div>
  68.                         <div class="block_comm"><?php if (!empty($post->post_password)) { ?>
  69.                 <?php } else { ?><div class="comments"><?php comments_popup_link( __('0</br>Comment', 'zenon'), __('1</br>Comment', 'zenon'), __('%</br>Comments', 'zenon'), '', __('Off' , 'zenon')); ?></div><?php } ?></div>
  70.  
  71.                        
  72.                     <a href="<?php the_permalink();?>"><img src="<?php echo get_template_directory_uri(); ?>/images/blank_img.png" alt="<?php the_title_attribute(); ?>" class="znn_thumbnail"/></a></div>  
  73.                              
  74.                     <?php endif; ?>
  75.                 </div>
  76.  
  77.                     <?php } ?>
  78.                
  79.                         </div>
  80.             <?php endwhile ?>
  81.  
  82. </div>
  83.             <?php if (function_exists("znn_paginate")) {znn_paginate();} ?>
  84.             <div class="hidden_nav"><?php paginate_links(); ?></div>
  85.             <?php wp_reset_query(); ?>
  86.     </div>
  87.  
  88. <!--LATEST POSTS END-->
  89.  
  90. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement