Advertisement
grysom

Untitled

May 1st, 2011
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.26 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <?php if(!is_paged()) { ?>
  4.  
  5. <div id="top" class="clearfloat">
  6.  
  7. <div id="headline">
  8.  
  9.  
  10. <?php query_posts("showposts=1&category_name=Headline"); ?>
  11. <?php while (have_posts()) : the_post();
  12. $values = get_post_custom_values("Image");
  13. ?>
  14.  
  15. <div class="title">
  16. <a href="<?php the_permalink();?>" rel="bookmark"><?php the_title(); ?></a>
  17. </div>
  18.  
  19. <div class="meta">
  20. [ <?php the_time('j M Y') ?> | <?php comments_popup_link('Bez komentáře &#187;', '1 koment &#187;', '% komentů &#187;');?> <?php if(function_exists('the_views')) { ?> <?php the_views(); } ?>]
  21. </div>
  22. <?php if (has_post_thumbnail()) {
  23. ?>
  24. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  25. <?php
  26. the_post_thumbnail('headline',array('class'=>'headline-thumb-wrapper', 'title'=>$title));
  27. ?>
  28. </a>
  29. <?php
  30. } else
  31. if (isset($values[0])){
  32. ?>
  33. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  34. <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php echo urlencode($values[0]); ?>&amp;w=300&amp;h=275&amp;zc=1&amp;q=100" alt="<?php the_title(); ?>" class="left" width="300" height="275" /></a>
  35. <?php
  36. } else {
  37. ?>
  38. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  39. <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/images/no-image.png&amp;w=300&amp;h=275&amp;zc=1&amp;q=100" alt="<?php the_title(); ?>" class="left" width="300" height="275" /></a>
  40. <?php } ?>
  41.  
  42. <?php the_excerpt(); ?>
  43. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">Zbytek &raquo;</a>
  44. <?php endwhile; ?>
  45. </div>
  46.  
  47. <div id="featured">
  48.  
  49. <img src="<?php bloginfo('template_url'); ?>/images/featured.png" width="59" height="17" alt="" />
  50.  
  51. <?php query_posts("showposts=4&category_name=Novinky"); $i = 1; ?>
  52.  
  53. <?php while (have_posts()) : the_post();
  54. $values = get_post_custom_values("Image");
  55. ?>
  56.  
  57. <div class="clearfloat">
  58.  
  59. <?php if (has_post_thumbnail()) {
  60. ?>
  61. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
  62. <?php
  63. the_post_thumbnail('novinky',array('class'=>'featured-thumb-wrapper', 'title'=>$title));
  64. ?>
  65. </a>
  66. <?php
  67. } else
  68. if (isset($values[0])){
  69. ?>
  70. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  71. <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php echo urlencode($values[0]); ?>&amp;w=100&amp;h=65&amp;zc=1&amp;q=100" alt="<?php the_title(); ?>" class="left" width="100" height="65" /></a>
  72. <?php
  73. } else {
  74. ?>
  75. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  76. <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/images/no-image.png&amp;w=100&amp;h=65&amp;zc=1&amp;q=100" alt="<?php the_title(); ?>" class="left" width="100" height="65" /></a>
  77. <?php } ?>
  78.  
  79. <div class="info">
  80. <a href="<?php the_permalink(); ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
  81. <div class="meta">[ <?php the_time('j M Y') ?> | <?php comments_popup_link('Bez komentáře &#187;', '1 koment &#187;', '% komentů &#187;');?> <?php if(function_exists('the_views')) { ?> <?php the_views(); } ?>]
  82. </div>
  83.  
  84. </div>
  85. </div>
  86.  
  87. <?php endwhile; ?>
  88.  
  89. </div>
  90.  
  91. </div>
  92.  
  93. <div id="middle" class="clearfloat">
  94. <img src="<?php bloginfo('template_url'); ?>/images/category.png" class="clearfloat" alt="" />
  95.  
  96. <ul id="slider1">
  97. <li>
  98. <p> <?php $display_categories = array(5,6,7,8,10); $i = 1;
  99. foreach ($display_categories as $category) { ?>
  100.  
  101. <div id="cat-<?php echo $i; ?>" class="category" onclick="window.location.href='<?php echo get_category_link($category);?>'" >
  102. <?php query_posts("showposts=1&cat=$category")?>
  103. <?php if (is_category($category)) { ?>
  104. <span class="cat_title"><?php single_cat_title(); ?></span>
  105.  
  106. <?php echo category_description($category); } ?>
  107. </div>
  108.  
  109. <?php $i++; ?>
  110. <?php } ?></p>
  111. </li>
  112. <li>
  113. <p> <?php $display_categories = array(9,10); $i = 1;
  114. foreach ($display_categories as $category) { ?>
  115.  
  116. <div id="cat-<?php echo $i; ?>" class="category" onclick="window.location.href='<?php echo get_category_link($category);?>'" >
  117. <?php query_posts("showposts=1&cat=$category")?>
  118. <?php if (is_category($category)) { ?>
  119. <span class="cat_title"><?php single_cat_title(); ?></span>
  120.  
  121. <?php echo category_description($category); } ?>
  122. </div>
  123.  
  124. <?php $i++; ?>
  125. <?php } ?></p>
  126. </li>
  127. </ul>
  128.  
  129. </div>
  130.  
  131. <?php } ?>
  132.  
  133. <div id="bottom" class="clearfloat">
  134.  
  135. <div id="front-list">
  136.  
  137. <?php
  138. $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
  139. query_posts("cat=-27,-28&paged=$page"); ?>
  140.  
  141. <?php while (have_posts()) : the_post();
  142. $values = get_post_custom_values("Image");
  143. ?>
  144.  
  145. <div class="clearfloat">
  146. <h3 class="cat_title"><?php the_category(', '); ?> &raquo;</h3>
  147. <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
  148. <div class="meta">[ <?php the_time('j M Y') ?> | <?php comments_popup_link('Bez komentáře', '1 koment', '% komentů');?> <?php if(function_exists('the_views')) { ?> <?php the_views(); } ?>]</div>
  149.  
  150. <div class="spoiler">
  151.  
  152. <?php if (has_post_thumbnail()) {
  153. ?>
  154. <a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  155. <?php
  156. the_post_thumbnail('front-list',array('class'=>'front-list-thumb-wrapper', 'title'=>$title));
  157. ?>
  158. </a>
  159. <?php
  160. } else
  161. if (isset($values[0])){
  162. ?>
  163. <a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  164. <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php echo urlencode($values[0]); ?>&amp;w=150&amp;h=150&amp;zc=1&amp;q=100" alt="<?php the_title(); ?>" class="left" width="150" height="150" /></a>
  165. <?php
  166. } else {
  167. ?>
  168. <a href="<?php the_permalink() ?>" rel="bookmark" title="Permalink na <?php the_title(); ?>">
  169. <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/images/no-image.png&amp;w=150&amp;h=150&amp;zc=1&amp;q=100" alt="<?php the_title(); ?>" class="left" width="150" height="150" /></a>
  170. <?php } ?>
  171.  
  172. <?php the_excerpt(); ?>
  173. </div>
  174.  
  175. </div>
  176.  
  177. <?php endwhile; ?>
  178.  
  179. <div class="navigation">
  180. <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); }
  181. else { ?>
  182.  
  183. <div class="right"><?php next_posts_link('Další &raquo;') ?></div>
  184. <div class="left"><?php previous_posts_link('&laquo; Předchozí') ?></div>
  185. <?php } ?>
  186.  
  187. </div>
  188.  
  189. </div>
  190.  
  191.  
  192. <?php get_sidebar(); ?>
  193.  
  194. </div>
  195.  
  196. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement