Manşet haber slayt geçişi.
Merhaba saygıdeğer arkadaşlar,
Ben yeni başladım kod işine. Siteme 1 tane tema satın aldım. Bu temada düzenleme yapmak istiyorum. Bana yardımcı olabilirseniz çok sevinirim. Aşağıda eklediğim kod manset.php dosyasına ait. Bu koda ne eklersem manset haberler slayt olarak otomatik geçiş yapar. Teşekkürler
<div class="main-slider">
<ul id="mainSlider">
<?php
wp_reset_query();
$args = array
(
'post_type'=> 'manset',
'showposts'=> '5'
);
query_posts( $args );
if (have_posts()) : while (have_posts()) : the_post();
?>
<li>
<a href="<?php if(get_post_meta($post->ID, 'url', true)) echo get_post_meta($post->ID, 'url', true); else the_permalink(); ?>">
<?php
if ( has_post_thumbnail()) :
the_post_thumbnail( 'manset', array('class' => 'fl-right', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' ));
elseif (get_post_meta($post->ID, 'resim', true) != '') :
echo '<img class="fl-right" src="'.get_post_meta($post->ID, 'resim', true).'" width="728" height="252" alt="'.get_the_title().'" />';
else :
echo '<img class="fl-right" src="'.fs_get_option('fs_logo').'" width="728" height="252" alt="'.get_the_title().'" />';
endif;
?>
<div class="info">
<p class="name"><?php the_title(); ?></p>
<p><?php fs_excerpt('fs_kisa_yazi5', 'fs_kisalt'); ?></p>
</div>
<div class="date">
<?php unset($previousday); ?>
<?php the_date(); ?>
</div>
</a>
</li>
<?php endwhile; endif; ?>
</ul>
</div>
<div class="clear"></div>
Php
uyarlanabilir sanırım
Merhaba saygıdeğer arkadaşlar,
Ben yeni başladım kod işine. Siteme 1 tane tema satın aldım. Bu temada düzenleme yapmak istiyorum. Bana yardımcı olabilirseniz çok sevinirim. Aşağıda eklediğim kod manset.php dosyasına ait. Bu koda ne eklersem manset haberler slayt olarak otomatik geçiş yapar. Teşekkürler
<div class="main-slider">
<ul id="mainSlider">
<?php
wp_reset_query();
$args = array
(
'post_type'=> 'manset',
'showposts'=> '5'
);
query_posts( $args );
if (have_posts()) : while (have_posts()) : the_post();
?>
<li>
<a href="<?php if(get_post_meta($post->ID, 'url', true)) echo get_post_meta($post->ID, 'url', true); else the_permalink(); ?>">
<?php
if ( has_post_thumbnail()) :
the_post_thumbnail( 'manset', array('class' => 'fl-right', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' ));
elseif (get_post_meta($post->ID, 'resim', true) != '') :
echo '<img class="fl-right" src="'.get_post_meta($post->ID, 'resim', true).'" width="728" height="252" alt="'.get_the_title().'" />';
else :
echo '<img class="fl-right" src="'.fs_get_option('fs_logo').'" width="728" height="252" alt="'.get_the_title().'" />';
endif;
?>
<div class="info">
<p class="name"><?php the_title(); ?></p>
<p><?php fs_excerpt('fs_kisa_yazi5', 'fs_kisalt'); ?></p>
</div>
<div class="date">
<?php unset($previousday); ?>
<?php the_date(); ?>
</div>
</a>
</li>
<?php endwhile; endif; ?>
</ul>
</div>
<div class="clear"></div>
Ayrıntılı php bilgim yok amatörüm yeni öğreniyorum örneklerle çalışıyorum bende ama elimdeki örnek kodda son eklenen 7 adet resmin slayt geçişini sağlıyor kodlarınızın uygun yerine yerleştirip mysql ve php kodlarını kendinize göre uyarlarsanız çalışır diye düşünüyorum.
<div style="position: absolute; width: 100px; height: 100px; z-index: 501" id="katman2">
<img src="Standard/img/new-ribbon.png" width="112" height="112" alt="New Ribbon" id="ribbon">
<div id="slides">
<div class="slides_container">
<?php
$mansetler = mysql_query("SELECT * FROM emlak order by id desc LIMIT 0,7");
while($manset = mysql_fetch_array($mansetler))
{
$mansetlerCO = mysql_query("SELECT * FROM resimler where emlak='".$manset['id']."'");
if($mansetCO = mysql_fetch_array($mansetlerCO))
{
}
?>
<a href="<?=$manset['id']?>_<?=duzgundur(StrToLower($manset['emlak']))?>.html" title="" >
<div style="position: absolute; width: 595px; height: 60px; top:220px; z-index: 102; background:#C0C0C0; color:#fff; overflow:hidden; z-index:200; opacity:.8; filter:alpha(opacity=80)" id="katman3" ><br> <b><font color="#000000" face="Tahoma" style="font-size: 12pt"><?=substr($manset['emlak'],0,60)?>.. - Fiyat: <?=$manset['fiyat']?> TL</font></b></div>
<img src="<?=$mansetCO['resim']?>" width="600" height="270" alt=""></a>
<?php } ?>
</div>
<a href="#" class="prev"><img src="Standard/img/arrow-prev.png" width="24" height="43" alt="Arrow Prev"></a>
<a href="#" class="next"><img src="Standard/img/arrow-next.png" width="24" height="43" alt="Arrow Next"></a>
</div>
<img src="Standard/img/example-frame.png" width="739" height="341" alt="Example Frame" id="frame">
</div>