<img src="resimadresi" width="150" align="left" />
the_content_limit Hakkında Ufak Bir Soru
12
●1.362
- 17-05-2010, 17:56:53Kimlik doğrulama veya yönetimden onay bekliyor.<?php the_content_limit(500, ""); ?>
Bunun icin fonksiyon kodlarini temanizdaki functions.php icerisine eklemeniz yeterli..
<?php function the_content_limit($max_char, $more_link_text = '(more...)', $stripteaser = 0, $more_file = '') { $content = get_the_content($more_link_text, $stripteaser, $more_file); $content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content); $content = strip_tags($content); if (strlen($_GET['p']) > 0) { echo "<p>"; echo $content; echo " <a href='"; the_permalink(); echo "'>"."Devami →</a>"; echo "</p>"; } else if ((strlen($content)>$max_char) && ($espacio = strpos($content, " ", $max_char ))) { $content = substr($content, 0, $espacio); $content = $content; echo ""; echo $content; echo "..."; echo " <a href='"; the_permalink(); echo "'>".$more_link_text."</a>"; echo ""; } else { echo "<p>"; echo $content; echo " <a href='"; the_permalink(); echo "'>"."Devami →</a>"; echo "</p>"; } } - 18-05-2010, 11:47:31Çalıştırmadı kardeşim :S devamlı hata aldım..TekimNet adlı üyeden alıntı: mesajı görüntüle
Saol kardeşim temizledim.Bloomm adlı üyeden alıntı: mesajı görüntüle