Advertisement
towfiqi

page template

Feb 7th, 2014
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. <?php
  2.  
  3. /* Template Name: Galeria
  4.  
  5. */
  6.  
  7. $option = get_option('scl_options'); ?>
  8.  
  9. <?php get_header(); ?>
  10.  
  11.  
  12.  
  13. <div id="content">
  14.  
  15. <!--Slider-->
  16.  
  17. <div id="slide_wrap">
  18.  
  19. <?php if($option["scl_diss_rbn"] == "1"){ ?><?php } else { ?><div class="ribbon"><?php echo $option['scl_rbn_txt'] ?></div><?php } ?>
  20.  
  21. <?php if($option['scl_slider']== "Easyslider") { ?>
  22.  
  23. <?php get_template_part('easyslider'); ?>
  24.  
  25. <?php }?>
  26.  
  27. </div>
  28.  
  29.  
  30.  
  31.  
  32.  
  33. <!--POSTS-->
  34.  
  35. <div id="posts">
  36.  
  37.  
  38.  
  39. <div id="lay1">
  40. <?php
  41.  
  42. $args = array(
  43. 'post_type' => 'post',
  44. 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1),
  45. 'posts_per_page' => '6');
  46. $the_query = new WP_Query( $args );
  47. ?>
  48. <?php if(have_posts()): while(have_posts()): the_post(); ?>
  49.  
  50. <div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
  51.  
  52.  
  53.  
  54. <!--THE Date Badge-->
  55.  
  56. <?php if($option["scl_diss_date"] == "1"){ ?>
  57.  
  58. <?php } else { ?>
  59.  
  60.  
  61.  
  62. <div class="date"><div class="date_content"><?php the_time('dS'); ?> <?php the_time('M'); ?><span><?php the_time('Y'); ?></span></div></div>
  63.  
  64. <?php }?>
  65.  
  66.  
  67.  
  68. <div class="post_image">
  69.  
  70. <!--CALL TO POST IMAGE-->
  71.  
  72. <?php if ( has_post_thumbnail() ) : ?>
  73.  
  74. <div class="imgwrap"><a href="<?php the_permalink();?>"><?php the_post_thumbnail('medium'); ?></a></div>
  75.  
  76.  
  77.  
  78. <?php elseif($photo = scl_get_images('numberposts=1', true)): ?>
  79.  
  80.  
  81.  
  82. <div class="imgwrap">
  83.  
  84. <a href="<?php the_permalink();?>"><?php echo wp_get_attachment_image($photo[0]->ID ,'medium'); ?></a></div>
  85.  
  86.  
  87.  
  88. <?php else : ?>
  89.  
  90.  
  91.  
  92. <div class="imgwrap"><a href="<?php the_permalink();?>"><img src="<?php echo get_template_directory_uri(); ?>/images/blank_img.png" alt="<?php the_title_attribute(); ?>" class="thumbnail"/></a></div>
  93.  
  94.  
  95.  
  96. <?php endif; ?>
  97.  
  98.  
  99.  
  100. </div>
  101.  
  102.  
  103.  
  104.  
  105.  
  106. <div class="post_content">
  107.  
  108. <h2 class="postitle"><a href="<?php the_permalink();?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  109.  
  110. <?php scl_excerpt('scl_excerptlength_teaser', 'scl_excerptmore'); ?>
  111.  
  112. </div>
  113.  
  114.  
  115.  
  116. <div class="post_meta"><div class="block_comm"><?php if (!empty($post->post_password)) { ?>
  117.  
  118. <?php } else { ?><div class="comments"><?php comments_popup_link('0 <span>Comm</span>', '1 <span>Comm</span>', '% <span>Comm</span>', '', __('Off')); ?></div><?php } ?></div></div>
  119.  
  120.  
  121.  
  122. </div>
  123.  
  124.  
  125.  
  126. <?php endwhile ?>
  127. <?php wp_reset_postdata(); ?>
  128. <?php if (function_exists("scylla_paginate")) {
  129.  
  130. scylla_paginate();
  131.  
  132. } ?>
  133.  
  134. <?php endif ?>
  135.  
  136. </div>
  137.  
  138.  
  139.  
  140. </div>
  141.  
  142. </div>
  143.  
  144.  
  145.  
  146. <!--Sidebar-->
  147.  
  148. <?php get_sidebar(); ?>
  149.  
  150. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement