Guest User

Untitled

a guest
Jun 15th, 2012
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php $cache_ismi2 = "cache_ismi2";
  2. $cache_zamani2 = 60 * 5; // 60*10=600 buda 10 dakikaya esittir heralde :)
  3. if(false === get_transient($cache_ismi2)){
  4. ob_start(); ?>
  5.  
  6. <div id="slider" class='jdslider'>
  7. <?php $orco = new Wp_Query("showposts=10"); while($orco->have_posts()) : $orco->the_post(); ?>
  8. <a href="<?php the_permalink('') ?>" target="_blank">
  9. <img src="<?php $values = get_post_custom_values("orco"); if($values==""){}else{$values = get_post_custom_values("orco"); echo $values[0];} ?>" alt="<?php the_title(''); ?>"/>
  10. <h1><?php the_title(); ?></h1>
  11. </a>
  12. <?php endwhile; ?>
  13.  
  14. <!-- #wp-döngüsü bitti -->
  15. </div>
  16. </div>
  17.  
  18. <?php
  19. set_transient($cache_ismi2, ob_get_contents(), $cache_zamani2);
  20. ob_end_flush();
  21. }else{
  22. echo get_transient($cache_ismi2); }
  23. ?>
RAW Paste Data