Sizlere mükemmel bir tema tanıtacağım. (Ben bu gazla wordpress’ten download sitesi yaparım
) Daha önce bu temaya DLE sisteminde rastlamıştım. R10′da Gangstamonu nickli arkadaşımız temayı wordpress sistemine çevirmiş. Arkadaşın tek istediği temadaki 2 link kalkmasın. Öncelikle eklentileri etkinleştirin. Temayı sonra kurun.

Demo Site: http://portal.webografi.com

devamını oku…
WordPress 3.0 için hazırlanmış süper bir tema. Şarkı sözü sitesi için kullanabilirsiniz.

indir: Lyricsy
devamını oku…
WordPress üye sayısını göstermek için aşağıdaki kodu kullanabilirsiniz.
< ?php
$user_count = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->users;”);?>
< ?php echo ''. $user_count; ? > üyemiz var
devamını oku…
WordPress sitenizde toplam yorum sayısını göstermek için aşağıdaki kodu kullanabilirsiniz.
<?php
$numcomms = $wpdb->get_var(”SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = ‘1′”);
if (0 < $numcomms) $numcomms = number_format($numcomms);
echo “Sitemizde ki yazılara toplam “.$numcomms.” yorum yapıldı.”;
?>
devamını oku…
Sitenizde yayınlamış olduğunuz konu sayısını kullanıcılara göstermek için aşağıdaki kodu uygun gördüğünüz bir kısma ekleyebilirsiniz.
<?php
$yazi_sayi = wp_count_posts( 'post' );
echo "Bu blogda toplam ".$yazi_sayi->publish." yazı bulunuyor.";
?>
devamını oku…
Beklediğimiz sürüm geldi. WordPress 3.0 resmi olarak yayınlandı. Bugün güncellediğimde gözle görülür tek değişikliğin admin panelinin rengi olduğunu farkettim
Şaka bir yana bir çok özellik gelmiş, hatalar düzeltmiş. Ve wp 3.0 ile site hızlandı gibi öyle değil mi?
devamını oku…
En çok yorum alan yazıları aşağıdaki kodlarla gösterebilirsiniz.
<strong>En Çok İlgi Çeken Yazılar:</strong>
<ul id="moostick">
<?php
$result = $wpdb->get_results("SELECT comment_count,ID,post_title FROM $wpdb->posts ORDER BY comment_count DESC LIMIT 0 , 5");
foreach ($result as $topten) {
$postid = $topten->ID;
$title = $topten->post_title;
$commentcount = $topten->comment_count;
if ($commentcount != 0) { ?>
<li><a href="<?php echo get_permalink($postid); ?>" title="<?php echo $title ?>"><?php echo $title ?> » <span><?php echo $commentcount; ?> yorum aldı.</span></a></li>
<?php } } ?>
</ul>
Bu kodlar temanızda özel alan kullanarak yazı,mp3,resim kullanımını sağlıyor.
<?php $key = "muzik";
$getir = get_post_meta($post->ID, $key, true);
if($getir != "") { ?>
<object id="mediaPlayer"
width="320"
height="300"
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"
standby="Microsoft Windows Media Player bilesenleri yukleniyor.."
type="application/x-oleobject">
<param name="FileName" VALUE="<?php echo $getir; ?>">
<param name="ShowControls" value="1">
<param name="AutoStart" value="0">
<param name="ShowDisplay" value="False">
<param name="AutoRewind" value="0">
<param name="PlayCount" value="3">
<param name="ShowStatusBar" value="1">
<param name="ShowGotoBar" value="0">
<param name="AutoSize" value="0">
<param name="EnableContextMenu" value="false">
<param name="BorderStyle" VALUE="1">
<param name="DisplayForeColor" VALUE="0">
<param name="DisplayBackColor" VALUE="0">
<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
filename="<?php echo $getir; ?>"
src="<?php echo $getir; ?>"
name="mediaPlayer"
autostart=0
showcontrols=1
showdisplay=False
showgotobar=0
enablecontextmenu=false
showstatusbar=1
autosize="0"
width="320" height="300">
</embed>
</object>
<?php } ?>
üstteki kodları temanızın index.php dosyasındaki
<?php the_content('Yazının tamamını okuyun »'); ?>
kodunun altına yapıştırıyoruz.
devamını oku…
Benzer yazıları genellikle eklenti kullanarak gösteririz. Ama bunu kodlarla göstermekte mümkün
<?php
$this_post = $post;
$category = get_the_category(); $category = $category[0]; $category = $category->cat_ID;
$posts = get_posts('numberposts=4&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 ++;
}
}
?>
<?php if ( $posts ) : ?>
<ul>
<?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 . "..."; ?>
<li><a href="<?php the_permalink(); ?>" title="<?php echo $a_title ?>">
<?php if ( get_the_title() ) { the_title(); } else { echo "Untitle"; } ?></a>
<?php endforeach // $posts as $post ?>
</ul>
<?php endif // $posts ?>
<?php
$post = $this_post;
unset($this_post);
?>
devamını oku…
Etiket bulutu göstermek için;
<?php wp_tag_cloud('smallest=11&largest=25&unit=px&number=50&format=flat&orderby=count&order=RAND'); ?>
devamını oku…
Son Yorumlar