Son Eklenen Konular
KategorilerKod:<?php wp_get_archives('type=postbypost&limit=15'); ?>
YorumlarKod:<?php wp_list_cats(); ?>
Etiketler (Tag Cloud)Kod:<?phpglobal $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;?>
BağlantılarKod:<?php wp_tag_cloud('smallest=8&largest=20'); ?>
Aylık ArşivKod:<?php get_links_list(); ?>
Yıllık ArşivKod:<?php wp_get_archives('type=monthly'); ?>
SayfalarKod:<?php wp_get_archives('type=yearly'); ?>
Değişen Etiket BulutuKod:<?php wp_list_pages('title_li=<h2>Son Sayfalar</h2>'); ?>
Benzer YazılarKod:<?php wp_tag_cloud('smallest=11&largest=25&unit=px&number=50&format=flat&orderby=count&order=RAND'); ?>
------------------------------------------------------------------Kod:<?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="<); ?>" 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
altına yapıştır.Kod:<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
bunlarıda css'e ekle.(css renklerinizi kendinize göre ayarlayabilirsiniz.Kod:<div class="navigation"> <div class="alignleft"><?php previous_post_link('« %link') ?></div> <div class="alignright"><?php next_post_link('%link »') ?></div> </div>
------------------------------------------------------------------Kod:.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.
üstteki kodları alıpKod:<?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 } ?>temanızın index.php dosyasındaki <?php the_content('Yazının tamamını okuyun »'); ?> 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
Sayfaları rakamlı olarak göstermeKod:<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="<); ?>" title="<?php echo $title ?>"><?php echo $title ?> » <span><?php echo $commentcount; ?> yorum aldı.</span></a></li> <?php } } ?> </ul>
Eklentiyi Linkleri görebilmek için üye olmalısınız..[Üyelik İçin Tıklayın!] indiriyoruz.
Daha sonra siteye attıktan sonra etkinleştiriyoruz ve alttaki kodu istediğimiz bi' yere koyuyoruz.
GörünümKod:<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
![]()
Forum > Wordpress > Wordpress Plugin Dışı Kodlar >> [Clasic'e Teşekkürler]


































1Likes
LinkBack URL
About LinkBacks

mp3








Alıntı ile Cevapla


Bu Konuyu Paylaşın !