Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php $cache_ismi2 = "cache_ismi2";
- $cache_zamani2 = 60 * 5; // 60*10=600 buda 10 dakikaya esittir heralde :)
- if(false === get_transient($cache_ismi2)){
- ob_start(); ?>
- <div id="slider" class='jdslider'>
- <?php $orco = new Wp_Query("showposts=10"); while($orco->have_posts()) : $orco->the_post(); ?>
- <a href="<?php the_permalink('') ?>" target="_blank">
- <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(''); ?>"/>
- <h1><?php the_title(); ?></h1>
- </a>
- <?php endwhile; ?>
- <!-- #wp-döngüsü bitti -->
- </div>
- </div>
- <?php
- set_transient($cache_ismi2, ob_get_contents(), $cache_zamani2);
- ob_end_flush();
- }else{
- echo get_transient($cache_ismi2); }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement