Guest User

Untitled

a guest
Jan 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.31 KB | None | 0 0
  1. <?php
  2. global $options;
  3. foreach ($options as $value) {
  4. if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
  5. }
  6. ?>
  7.  
  8. <div id="blocks">
  9.  
  10. <?php
  11. $catid1 = $wpzoom_featured_category_1;
  12. $catid2 = $wpzoom_featured_category_2;
  13. $catid3 = $wpzoom_featured_category_3;
  14. $catid4 = $wpzoom_featured_category_4;
  15.  
  16. $cat1 = get_category($catid1,false);
  17. $cat2 = get_category($catid2,false);
  18. $cat3 = get_category($catid3,false);
  19. $cat4 = get_category($catid4,false);
  20.  
  21. $catlink1 = get_category_link($catid1);
  22. $catlink2 = get_category_link($catid2);
  23. $catlink3 = get_category_link($catid3);
  24. $catlink4 = get_category_link($catid4);
  25.  
  26. $breaking_cat1 = "cat=$catid1";
  27. $breaking_cat2 = "cat=$catid2";
  28. $breaking_cat3 = "cat=$catid3";
  29. $breaking_cat4 = "cat=$catid4";
  30. ?>
  31.  
  32. <div class="colart">
  33. <?php
  34. query_posts('showposts=1&' . $breaking_cat1 );
  35. while (have_posts()) : the_post(); ?>
  36.  
  37. <h3><?php echo"<a href=\"$catlink1\">$cat1->name</a>";?></h3>
  38.  
  39. <div class="thumb">
  40. <?php unset($photo);
  41.  
  42. if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
  43. the_post_thumbnail(array(240,9999, true));
  44. }
  45.  
  46. else{
  47.  
  48. if ($wpzoom_cf_use == 'Yes')
  49. {
  50. $photo = get_post_meta($post->ID, $wpzoom_cf_photo, true);
  51. } // if CF used
  52. else
  53. {
  54. if (!$photo)
  55. {
  56. $photo = catch_that_image($post->ID);
  57. }
  58. } // if CF not used
  59.  
  60. if ($photo)
  61. {
  62. ?>
  63. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?w=240&h=285&zc=1&src=<?php echo $photo; ?>" alt="<?php the_title(); ?>" /></a>
  64. <?php
  65. }
  66.  
  67. } // if theme does not have a thumbnail
  68. ?>
  69. </div>
  70.  
  71. <div class="entry">
  72.  
  73. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  74.  
  75. <?php the_excerpt(); ?>
  76.  
  77. <a class="more" href="<?php the_permalink() ?>">continue reading</a>
  78.  
  79.  
  80. <?php endwhile; ?>
  81. <?php wp_reset_query(); ?>
  82.  
  83. <div class="more_block">
  84. <span>More in <?php echo"$cat1->name";?></span>
  85. <?php query_posts('showposts=5&offset=1&' . $breaking_cat1 ); ?> <!-- More recent posts box, the first one is not included -->
  86. <ul>
  87. <?php while (have_posts()) : the_post(); ?>
  88. <li> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </li>
  89. <?php endwhile; ?>
  90. </ul>
  91. </div>
  92. <?php wp_reset_query(); ?>
  93.  
  94. </div>
  95.  
  96.  
  97. </div> <!-- /#column-1 -->
  98.  
  99.  
  100. <div class="colart">
  101. <?php
  102. query_posts('showposts=1&' . $breaking_cat2 );
  103. while (have_posts()) : the_post(); ?>
  104.  
  105. <h3><?php echo"<a href=\"$catlink2\">$cat2->name</a>";?></h3>
  106.  
  107. <div class="thumb">
  108. <?php unset($photo);
  109.  
  110. if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
  111. the_post_thumbnail(array(240,9999, true));
  112. }
  113.  
  114. else{
  115.  
  116. if ($wpzoom_cf_use == 'Yes')
  117. {
  118. $photo = get_post_meta($post->ID, $wpzoom_cf_photo, true);
  119. } // if CF used
  120. else
  121. {
  122. if (!$photo)
  123. {
  124. $photo = catch_that_image($post->ID);
  125. }
  126. } // if CF not used
  127.  
  128. if ($photo)
  129. {
  130. ?>
  131. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?w=240&h=285&zc=1&src=<?php echo $photo; ?>" alt="<?php the_title(); ?>" /></a>
  132. <?php
  133. }
  134.  
  135. } // if theme does not have a thumbnail
  136. ?>
  137. </div>
  138.  
  139. <div class="entry">
  140.  
  141. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  142.  
  143. <?php the_excerpt(); ?>
  144.  
  145. <a class="more" href="<?php the_permalink() ?>">continue reading</a>
  146.  
  147.  
  148. <?php endwhile; ?>
  149.  
  150. <?php wp_reset_query(); ?>
  151.  
  152. <div class="more_block">
  153. <span>More in <?php echo"$cat2->name";?></span>
  154. <?php query_posts('showposts=5&offset=1&' . $breaking_cat2 ); ?> <!-- More recent posts box, the first one is not included -->
  155. <ul>
  156. <?php while (have_posts()) : the_post(); ?>
  157. <li> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </li>
  158. <?php endwhile; ?>
  159. </ul>
  160. </div>
  161. <?php wp_reset_query(); ?>
  162. </div>
  163.  
  164. </div> <!-- /#column-2 -->
  165.  
  166.  
  167. <div class="colart">
  168. <?php
  169. query_posts('showposts=1&' . $breaking_cat3 );
  170. while (have_posts()) : the_post(); ?>
  171.  
  172. <h3><?php echo"<a href=\"$catlink3\">$cat3->name</a>";?></h3>
  173.  
  174. <div class="thumb">
  175. <?php unset($photo);
  176.  
  177. if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
  178. the_post_thumbnail(array(240,9999, true));
  179. }
  180.  
  181. else{
  182.  
  183. if ($wpzoom_cf_use == 'Yes')
  184. {
  185. $photo = get_post_meta($post->ID, $wpzoom_cf_photo, true);
  186. } // if CF used
  187. else
  188. {
  189. if (!$photo)
  190. {
  191. $photo = catch_that_image($post->ID);
  192. }
  193. } // if CF not used
  194.  
  195. if ($photo)
  196. {
  197. ?>
  198. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?w=240&h=285&zc=1&src=<?php echo $photo; ?>" alt="<?php the_title(); ?>" /></a>
  199. <?php
  200. }
  201.  
  202. } // if theme does not have a thumbnail
  203. ?>
  204. </div>
  205.  
  206. <div class="entry">
  207.  
  208. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  209.  
  210. <?php the_excerpt(); ?>
  211.  
  212. <a class="more" href="<?php the_permalink() ?>">continue reading</a>
  213.  
  214.  
  215. <?php endwhile; ?>
  216. <?php wp_reset_query(); ?>
  217.  
  218. <div class="more_block">
  219. <span>More in <?php echo"$cat3->name";?></span>
  220. <?php query_posts('showposts=5&offset=1&' . $breaking_cat3 ); ?> <!-- More recent posts box, the first one is not included -->
  221. <ul>
  222. <?php while (have_posts()) : the_post(); ?>
  223. <li> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </li>
  224. <?php endwhile; ?>
  225. </ul>
  226. </div>
  227. <?php wp_reset_query(); ?>
  228. </div>
  229.  
  230. </div> <!-- /#column-3 -->
  231.  
  232.  
  233. <div class="colart">
  234. <?php
  235. query_posts('showposts=1&' . $breaking_cat4 );
  236. while (have_posts()) : the_post(); ?>
  237.  
  238. <h3><?php echo"<a href=\"$catlink4\">$cat4->name</a>";?></h3>
  239.  
  240. <div class="thumb">
  241. <?php unset($photo);
  242.  
  243. if ( current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail() ) {
  244. the_post_thumbnail(array(240,9999, true));
  245. }
  246.  
  247. else{
  248.  
  249. if ($wpzoom_cf_use == 'Yes')
  250. {
  251. $photo = get_post_meta($post->ID, $wpzoom_cf_photo, true);
  252. } // if CF used
  253. else
  254. {
  255. if (!$photo)
  256. {
  257. $photo = catch_that_image($post->ID);
  258. }
  259. } // if CF not used
  260.  
  261. if ($photo)
  262. {
  263. ?>
  264. <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?w=240&h=285&zc=1&src=<?php echo $photo; ?>" alt="<?php the_title(); ?>" /></a>
  265. <?php
  266. }
  267.  
  268. } // if theme does not have a thumbnail
  269. ?>
  270. </div>
  271.  
  272. <div class="entry">
  273.  
  274. <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
  275.  
  276. <?php the_excerpt(); ?>
  277.  
  278. <a class="more" href="<?php the_permalink() ?>">continue reading</a>
  279.  
  280.  
  281. <?php endwhile; ?>
  282. <?php wp_reset_query(); ?>
  283.  
  284. <div class="more_block">
  285. <span>More in <?php echo"$cat4->name";?></span>
  286. <?php query_posts('showposts=5&offset=1&' . $breaking_cat4 ); ?> <!-- More recent posts box, the first one is not included -->
  287. <ul>
  288. <?php while (have_posts()) : the_post(); ?>
  289. <li> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> </li>
  290. <?php endwhile; ?>
  291. </ul>
  292. </div>
  293. <?php wp_reset_query(); ?>
  294. </div>
  295.  
  296. </div> <!-- /#column-4 -->
  297.  
  298.  
  299.  
  300. </div> <!-- end blocks -->
  301.  
  302. <?php wp_reset_query(); ?>
Add Comment
Please, Sign In to add comment