WordPress Bileşen Harici Kodlar

WordPress Bileşen Harici Kodlar





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 ) : ?>
    < ?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 . "..."; ?>
  • < ?php if ( get_the_title() ) { the_title(); } else { echo "Untitle"; } ?> < ?php endforeach // $posts as $post ?>
< ?php endif // $posts ?> < ?php $post = $this_post; unset($this_post); ?>

En Çok Yorumlanan Yazılar

    < ?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) { ?>
  • < ?php echo $title ?> » < ?php echo $commentcount; ?> yorum aldı.
  • < ?php } } ?>

Takvim

< ?php  get_calendar(); ?> 

Anasayfada Farklı 5 Yazı

< ?php
 $rand_posts = get_posts('numberposts=5&orderby=rand');
 foreach( $rand_posts as $post ) :
 ?>

< ?php the_title(); ?>

< ?php endforeach; ?>
GD Star Rating
loading...

Bu yazı Ekim 15, 2009 tarihinde yonetim tarafından Wordpress kategorisi altına yazılmış ve 1.558 defa okunmuş.

Tepki verin!

Önceki yazıyı okuyun:
Facebook CastleVille Oyunu

Sosyal ağlarda geçirilen vakitlerin artmasına paralel olarak online oyunların oynanmasında da bir artış oldu. Platform oyunu üreticilerin olan Zynga, son...

Kapat