Önce durumumu ifade edeyim. Html bilgim iyidir ama 40 yaşından sonra php mecburen bulaştığım için php bilgim yok gibi.. anca kendimce ufak tefek düzenlemeler yapabiliyorum.
Bir sitemde kullandığım portal temasının sağ sidebarındaki 2 bileşenin yapısını değiştirmek istiyorum. Bu bileşenler temanın kendisinden son haberler ve en çok okunan haberler diye gösterim yapıyor. Ben bu gösterim kutularını misal ID-5 ya da kategori-5'ten çeksin istiyorum.. Veya istediğim başka bir kategoriden. Bunun için kodda nasıl bir değişiklik yapmam lazım yardımcı olan olursa sevinirim ve şimdiden teşekkür ederim. Herkese kolay gelsin.
<?php
$foto_kat = of_get_option(foto_kat);
$video_kat = of_get_option(video_kat);
$yazarlar_ac = of_get_option(yazarlar_ac,"evet");
$sidebar_son_haberler_ac = of_get_option(sidebar_son_haberler_ac,"evet");
$sidebar_pop_haberler_ac = of_get_option(sidebar_pop_haberler_ac,"evet");
$sidebar_manset_ac = of_get_option(sidebar_manset_ac,"evet");
$foto_video_kat = $video_kat . "," . $foto_kat;
$sag_reklam = of_get_option(sag_reklam);
?>
<!-- ######## sag ########-->
<div id="sag">
<?php if($sag_reklam) { ?>
<div class="reklam-sag">
<?php echo $sag_reklam; ?>
</div>
<?php } ?>
<?php if($sidebar_son_haberler_ac == "evet") { ?>
<div class="bilesen son-haberler">
<h2 class="baslik"><span class="icon-pencil"></span>Son haberler</h2>
<div class="bilesen-ic">
<ul class="haber-liste">
<?php
query_posts('showposts=5');
while ( have_posts() ) : the_post();
?>
<li>
<a class="resim" href="<?php the_permalink(); ?>"><?php resim(120,90); ?></a>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
</li>
<?php endwhile;wp_reset_query(); ?>
</ul>
</div>
</div><!--/bilesen-->
<?php } ?>
<?php if($sidebar_manset_ac == "evet") { ?>
<div class="bilesen">
<h2>Fotoğraf-Video</h2>
<div class="sidebar-manset t">
<div class="degisen">
<?php
query_posts('showposts=10&cat='.$foto_video_kat.'');
while ( have_posts() ) : the_post();
$galeri_say++;
$haber_kat = get_the_category($post->ID);
?>
<div class="ic" data-id="<?php echo $galeri_say; ?>" data-link="<?php the_permalink(); ?>">
<?php kategori_esit_mi_yazininkine($post->ID); ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php resim(300,180); ?>
</div>
<?php endwhile;wp_reset_query(); ?>
</div>
<div class="tem"></div>
<ul class="sayfalar t">
<?php
query_posts('showposts=10&cat='.$foto_video_kat.'');
while ( have_posts() ) : the_post();
$galeri_li_say++;
?>
<li><a href="<?php the_permalink(); ?>"><?php echo $galeri_li_say; ?></a></li>
<?php endwhile;wp_reset_query(); ?>
</ul>
</div><!--/anasayfa-manset-->
</div><!--/bilesen-->
<?php } ?>
<?php if($sidebar_pop_haberler_ac == "evet") { ?>
<div class="bilesen populer-haberler">
<h2 class="baslik"><span class=" icon-signal"></span>Çok Okunan haberler</h2>
<div class="bilesen-ic">
<ul class="haber-liste">
<?php
query_posts('showposts=5&v_sortby=views');
while ( have_posts() ) : the_post();
?>
<li>
<a class="resim" href=""><?php resim(120,90); ?></a>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
</li>
<?php endwhile;wp_reset_query(); ?>
</ul>
</div>
</div><!--/bilesen-->