Advertisement
alchymyth

multiloop tut

Jul 22nd, 2011
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.56 KB | None | 0 0
  1. <?php get_header(); ?>
  2.  
  3. <div id="content">
  4.  
  5. <div class="postsbody">
  6.  
  7. <?
  8. global $options;
  9. foreach ($options as $value) {
  10.     if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
  11. }
  12. ?>
  13. <div class="ads1">
  14. <?php include (TEMPLATEPATH . '/adsense/adsense468-15.php'); ?>
  15. </div>
  16.  
  17. <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=10,1,1,0" width="640" height="256">
  18.   <param name="src" value="http://skutocnepreklady.com/wp-content/uploads/social%20media%20banner/social%20media%20banner.swf" />
  19.   <embed src="http://skutocnepreklady.com/wp-content/uploads/social%20media%20banner/social%20media%20banner.swf" pluginspage="http://www.adobe.com/shockwave/download/" width="640" height="256"></embed>
  20. </object>
  21.  
  22. <div class="featured">
  23.   <h2>Čo sa práve hrá v hitparádach </h2>
  24.   <div style="padding:15px 0 15px 20px;">
  25.   <?php $do_not_duplicate = array();
  26.   $recent = new WP_Query("cat=67&showposts=4"); while($recent->have_posts()) : $recent->the_post();
  27.   $do_not_duplicate[] = $post->ID; ?>
  28.  
  29.   <div class="videopart">
  30.    
  31.   <div class="thumbnail">
  32.   <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID, "thumb", true); ?>" width="120" height="90" alt="<?php the_title(); ?>" /></a>
  33.   </div>
  34.    
  35.   <div class="fpost">
  36.   <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  37.   <p><?php if(function_exists('the_views')) { the_views(); } ?></p>
  38.   <p><?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>  
  39.   </div>
  40.    
  41.   </div>
  42.   <?php endwhile; ?>
  43.   </div>
  44.  
  45. <?php // random 4 posts ?>
  46.   <div style="padding:15px 0 15px 20px;">
  47.   <?php $args = array(
  48. 'post__not_in' => $do_not_duplicate,
  49. 'showposts' => 4,
  50. 'cat' => 67,
  51. 'orderby' => 'rand'
  52. );
  53. $recent = new WP_Query( $args ); while($recent->have_posts()) : $recent->the_post();
  54.   $do_not_duplicate[] = $post->ID; ?>
  55.  
  56.   <div class="videopart">
  57.    
  58.   <div class="thumbnail">
  59.   <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID, "thumb", true); ?>" width="120" height="90" alt="<?php the_title(); ?>" /></a>
  60.   </div>
  61.    
  62.   <div class="fpost">
  63.   <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  64.   <p><?php if(function_exists('the_views')) { the_views(); } ?></p>
  65.   <p><?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>  
  66.   </div>
  67.    
  68.   </div>
  69.   <?php endwhile; ?>
  70.   </div>
  71. </div>
  72.  
  73. <div class="ads2">
  74. <?php include (TEMPLATEPATH . '/adsense/adsense468-60.php'); ?>
  75. </div>
  76.  
  77.  
  78.  
  79. <div class="featured">
  80. <h2>Všetko</h2>
  81.  
  82. <?php // 4 recent posts cat 11 ?>
  83. <div style="padding:15px 0 15px 20px;">
  84. <?php $args = array(
  85. 'post__not_in' => $do_not_duplicate,
  86. 'showposts' => 4,
  87. 'cat' => 11,
  88. );
  89. $recent = new WP_Query( $args ); while($recent->have_posts()) : $recent->the_post();
  90.  $do_not_duplicate[] = $post->ID; ?>
  91. <div class="videopart">
  92.  
  93. <div class="thumbnail">
  94. <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID, "thumb", true); ?>" width="120" height="90" alt="<?php the_title(); ?>" /></a>
  95. </div>
  96.  
  97. <div class="fpost">
  98. <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  99. <p><?php if(function_exists('the_views')) { the_views(); } ?></p>
  100. <p><?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>  
  101. </div>
  102.  
  103. </div>
  104. <?php endwhile; ?>
  105. </div>
  106.  
  107. <?php // random 8 posts ?>
  108. <div style="padding:15px 0 15px 20px;">
  109. <?php $args = array(
  110. 'post__not_in' => $do_not_duplicate,
  111. 'showposts' => 8,
  112. 'cat' => 11,
  113. 'orderby' => 'rand'
  114. );
  115. $recent = new WP_Query( $args ); while($recent->have_posts()) : $recent->the_post();?>
  116. <div class="videopart">
  117.  
  118. <div class="thumbnail">
  119. <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php echo get_post_meta($post->ID, "thumb", true); ?>" width="120" height="90" alt="<?php the_title(); ?>" /></a>
  120. </div>
  121.  
  122. <div class="fpost">
  123. <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  124. <p><?php if(function_exists('the_views')) { the_views(); } ?></p>
  125. <p><?php if(function_exists('the_ratings')) { the_ratings(); } ?></p>  
  126. </div>
  127.  
  128. </div>
  129. <?php endwhile; ?>
  130. </div>
  131. </div>
  132.  
  133.  
  134.  
  135. </div>
  136.  
  137. <?php include (TEMPLATEPATH . '/sidebar_right.php'); ?>
  138.  
  139. </div>
  140.  
  141.  
  142.  
  143. <?php get_footer(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement