// 09.09.09 18.20 en kısa sürede yep yeni kodlar burada olacak.

Son Eklenen Konular
<?php wp_get_archives('type=postbypost&limit=15'); ?>
Kategoriler
<?php wp_list_cats(); ?>
Yorumlar
<?php
    global $wpdb;
    $sql = "SELECT DISTINCT ID, post_title, post_password, comment_ID,
    comment_post_ID, comment_author, comment_date_gmt, comment_approved,
    comment_type,comment_author_url,
    SUBSTRING(comment_content,1,30) AS com_excerpt
    FROM $wpdb->comments
    LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID =
    $wpdb->posts.ID)
    WHERE comment_approved = '1' AND comment_type = '' AND
    post_password = ''
    ORDER BY comment_date_gmt DESC
    LIMIT 10";
    $comments = $wpdb->get_results($sql);
    $output = $pre_HTML;
    $output .= "\n<ul>";
    foreach ($comments as $comment) {
    $output .= "\n<li>".strip_tags($comment->comment_author)
    .":" . "<a href=\"" . get_permalink($comment->ID) .
    "#comment-" . $comment->comment_ID . "\" title=\"on " .
    $comment->post_title . "\">" . strip_tags($comment->com_excerpt)
    ."</a></li>";
    }
    $output .= "\n</ul>";
    $output .= $post_HTML;
    echo $output;?>
Etiketler (Tag Cloud)
<?php wp_tag_cloud('smallest=8&largest=20'); ?>
Bağlantılar
<?php get_links_list(); ?>
Aylık Arşiv
<?php wp_get_archives('type=monthly'); ?>
Yıllık Arşiv
<?php wp_get_archives('type=yearly'); ?>
Sayfalar
<?php wp_list_pages('title_li=<h2>Son Sayfalar</h2>'); ?>
Değişen Etiket Bulutu
<?php wp_tag_cloud('smallest=11&largest=25&unit=px&number=50&format=flat&orderby=count&order=RAND'); ?>
Benzer Yazılar
<?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);
?>
****************
Yazı Gösterim Sayfasında Önceki ve Sonraki Yazıya Bağlantı İçin
single.php'de bul
	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
altına yapıştır.
		<div class="navigation">
			<div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
			<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
		</div>
bunlarıda css'e ekle.(css renklerinizi kendinize göre ayarlayabilirsiniz.
.navigation {
	width: 500px;
	height: 20px;
	margin-bottom: 10px;
	font-size: 9px;
	font-weight: bold;
	color: #FFFFFF;
}
.navigation a {
	color: #FFFFFF;
}
.navigation .alignleft {
	float: left;
}
.navigation .alignright {
	float: right;
}
********************
Özel alan kullanımı
bu kodlar temanızda özel alan kullanarak yazı,mp3,resim kullanımını sağlıyor.
örneğin bi' müzik siteniz var ve her seferinde media player kodlarını kullanmaktan bıktınız.Buna çözüm 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ı alıp,temanızın index.php dosyasındaki <?php the_content('Yazının tamamını okuyun &raquo;'); ?> kodunun altına yapıştırıyoruz ve olay tamam.O kadar çok kodu her seferinde eklemiyeceksiniz artık.
Eklemek nasıl olacak?

Görünüm nasıl olacak?
Default temadaki görünümü..

******************
En Çok Yorum Alan Yazılar.
<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 ?> &raquo; <span><?php echo $commentcount; ?> yorum aldı.</span></a></li>
<?php } } ?> 
</ul>
Sayfaları rakamlı olarak gösterme
Eklentiyi buradan indiriyoruz.
Daha sonra siteye attıktan sonra etkinleştiriyoruz ve alttaki kodu istediğimiz bi' yere koyuyoruz.
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
Görünüm

/Son Güncelleme: 12.12.2008 23:03