Son eklenenleri ana sayfada göstermek.
4
●401
- 04-06-2009, 15:11:52
<? include "blog/wp-config.php"; mysql_query("SET NAMES 'latin5'"); mysql_query("SET CHARACTER SET latin5"); mysql_query("SET COLLATION_CONNECTION = 'latin5_turkish_ci'"); $my_query = new WP_Query('cat=3&showposts=5'); while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a><br> <? endwhile;?>bu sekilde cekebilirsin dostum.
$my_query = new WP_Query('cat=3&showposts=5');buradaki cat=3 degeri blogundaki kategori ID sini veriyor. Bu degeri degiştirerek istedigin kategorideki verileri cekebilirsin.showposts=5 taki 5 degeride ana sayfada gosterecegın baslık sayısı.
takıldıgın bır nokta olursa yardımcı olabilirim tekrar. - 04-06-2009, 15:25:25
<? include "blog/wp-config.php"; $my_query = new WP_Query('cat=3&showposts=5'); while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; ?> <a href="<?php the_permalink() ?>"><?php the_title(); ?></a><br> <? endwhile;?>birde bu sekilde denermisin. bende calısıyor su anda.
olmazsa sitenin adını pm ile at ben bi kontrol edeyim dostum.Ha bu arada kategori ID si 3 olan bir deger yoksa ondanda yapıyor olabilir.