Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Template Name: Blog Page
- */
- ?>
- <?php get_header(); ?>
- <!--LATEST POSTS-->
- <div class="lay1">
- <div class="lay1_wrap">
- <?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
- query_posts("showposts=6&category_name=blog&paged=$page");
- while ( have_posts() ) : the_post() ?>
- <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
- <div class="post_content">
- <h2 class="postitle"><a href="<?php the_permalink();?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
- <?php znn_excerpt('znn_excerptlength_index', 'znn_excerptmore'); ?>
- </div>
- <?php if ( znn_get_custom_field_value('videolink') != "") { ?>
- <div class="imgwrap">
- <object width="284" height="200">
- <param name="movie"
- value="https://www.youtube.com/v/v-<?php znn_get_custom_field_value('videolink', true); ?>?version=3&autohide=1&showinfo=0"></param>
- <param name="allowScriptAccess" value="always"></param>
- <embed src="https://www.youtube.com/v/v-<?php znn_get_custom_field_value('videolink', true); ?>?version=3&autohide=1&showinfo=0"
- type="application/x-shockwave-flash"
- allowscriptaccess="always"
- width="284" height="200"></embed>
- </object>
- </div>
- <?php } else { ?>
- <div class="post_image">
- <!--CALL TO POST IMAGE-->
- <?php if ( has_post_thumbnail() ) : ?>
- <div class="imgwrap">
- <div class="date_meta"><?php the_time('d'); ?><?php the_time('S'); ?> <?php the_time('M'); ?></div>
- <div class="block_comm"><?php if (!empty($post->post_password)) { ?>
- <?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>
- <a href="<?php the_permalink();?>"><?php the_post_thumbnail('medium'); ?></a></div>
- <?php elseif($photo = znn_get_images('numberposts=1', true)): ?>
- <div class="imgwrap">
- <div class="date_meta"><?php the_time('d'); ?><?php the_time('S'); ?> <?php the_time('M'); ?></div>
- <div class="block_comm"><?php if (!empty($post->post_password)) { ?>
- <?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>
- <a href="<?php the_permalink();?>"><?php echo wp_get_attachment_image($photo[0]->ID ,'medium'); ?></a></div>
- <?php else : ?>
- <div class="imgwrap">
- <div class="date_meta"><?php the_time('d'); ?><?php the_time('S'); ?> <?php the_time('M'); ?></div>
- <div class="block_comm"><?php if (!empty($post->post_password)) { ?>
- <?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>
- <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>
- <?php endif; ?>
- </div>
- <?php } ?>
- </div>
- <?php endwhile ?>
- </div>
- <?php if (function_exists("znn_paginate")) {znn_paginate();} ?>
- <div class="hidden_nav"><?php paginate_links(); ?></div>
- <?php wp_reset_query(); ?>
- </div>
- <!--LATEST POSTS END-->
- <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement