aslında kategori id sini elle girince sorun olmuyor ama diyelim 5 tane kategori var x kategorinden bir yazı da adam ama bende oraya y kategorisi id si girmişim y kategorisinin yazıları görüntüleniyor. ama o zamanda pek çekici gelmiyor kullanıcıya
tias senin ücretsiz bir video teması var mavi bir şey adı klipree ti galiba onda vardı heralde video hangi kategoride ise onunla aynı kategorideki videolar yanda listeleniyordu.
aşağıda işaretlediğim yerki kodlardan birismi acaba
php bilen arkadaşlar yardımcı olabilir mi?
kodu aşağıdaki idi galiba
<div id="rastsingle">
<h2>Rastgele Klipler</h2>
<div id="rastlistsingle">
<?php query_posts('orderby=rand&showposts=3&paged='.intval(get_query_var('paged'))); if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="klipcephe">
<div class="news-img"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php $values = get_post_custom_values("resim"); echo $values[0]; resim_cagir(0); ?>" width="127" height="87"></a></div>
<div style=" margin:0 3px 0 3px;" align="center">
<div class="text2" align="center"><span id="soneklenenklipadi"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?> klibi izle,klibini izle,klibi indir,izlenme: <?php $values = get_post_custom_values("views"); echo $values[0]; ?>"><?php echo substr($post->post_title, 0, 15). ".."; ?></a></span></div>
<div id="soneklenenklip" style=""><?php the_category(); ?></div>
</div>
</div>
<?php endwhile;endif; ?>
<!-- 200x200 adsense -->
<!-- 200x200 adsense -->
</div>
</div>
[COLOR="DarkRed"]<?php $this_post = $post; $category = get_the_category(); $category = $category[0]; $category = $category->cat_ID; $posts = get_posts('numberposts=2&offset=0&orderby=post_date&order=DESC&category='.$category); $count = 0; foreach ( $posts as $post ) { if ( $post->ID == $this_post->ID || $count == 5) { unset($posts[$count]); } else{ $count ++; } } ?>[/COLOR]<?php if ( $posts ) : ?>
<div id="rastsinglealt">
<h2><?php the_category(); ?></h2>
<div id="rastlistsinglealt">
<?php function getWords($text, $limit) { $array = explode(" ", $text, $limit +1); if(count($array) > $limit) { unset($array[$limit]); } return implode(" ", $array); } ?>
<?php foreach ( $posts as $post ) : ?>
<?php $mycontent = strip_tags($post->post_content); $excerpt = getWords($mycontent, 15); $a_title = $excerpt . "..."; ?>
<div id="klipcephe">
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><div id="rastsinglealtimg"></div></a>
<div style=" margin:0 3px 0 3px;" align="center">
<div class="text2" align="center"><span id="soneklenenklipadi"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?> klibi izle,klibini izle,klibi indir,izlenme: <?php $values = get_post_custom_values("views"); echo $values[0]; ?>"><?php echo substr($post->post_title, 0, 30). ""; ?></a></span></div>
</div>
</div>
<?php endforeach?>
</div>
</div>
<?php endif ?>
<?php $post = $this_post; unset($this_post); ?>