<?php $id =$post->ID;
$the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
$pattern = '!<img.*?src="(.*?)"!';
preg_match_all($pattern, $the_content, $matches);
$image_src = $matches['1'][0]; ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><img src="<?php if($image_src != '') { echo $image_src; } ?>"
alt="<?php the_title(); ?>" width="150px" height="220px" align="left" class="left" /></a>
kodu <?php the_excerpt(); ?> kodunun üstüne ekleyin resim boyutlarını kendinize göre düzenlersiniz.
Bu temada resmi nasıl ana sayfada gösterebilirim? Resim anahtar kelimeleri nelerdir?
12
●700
- 10-03-2010, 21:58:40Kafam o kadar karıştı ki bu kod acaba hangi dosya içinde ?harew1 adlı üyeden alıntı: mesajı görüntüle
- 14-03-2010, 14:25:46Emekler için tek tek teşekkür ederim ne yaptıysak olmuyor çözüm öneri tavsiye yardımları dinlemeye devam ediyorumMavishim adlı üyeden alıntı: mesajı görüntüle