Benden birkaç sani önce yazmışsın. Ben halletmiştim teşekkür ederim. Ayrıca tam çalışır kodları ekleyeyim thumbnail vb içerisinde var.
function the_content_limit($max_char, $more_link_text = '', $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 "";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."Devam →</a>";
echo "";
}
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 "'>"."Devam →</a>";
echo "";
}
else {
echo "";
echo $content;
echo " <a href='";
the_permalink();
echo "'>"."Devam →</a>";
echo "";
}
}
function get_thumbnail($postid=0, $size='full') {
if ($postid<1)
$postid = get_the_ID();
$thumb = get_post_meta($postid, "thumbnail", TRUE);
if ($thumb != null or $thumb != '') {
echo $thumb;
}
elseif ($images = get_children(array(
'post_parent' => $postid,
'post_type' => 'attachment',
'numberposts' => '1',
'post_mime_type' => 'image', )))
foreach($images as $image) {
$thumbnail=wp_get_attachment_image_src($image->ID, $size);
?>
<?php echo $thumbnail[0]; ?>
<?php
}
else {
echo get_bloginfo ( 'stylesheet_directory' );
echo 'resim-bulamadim.gif';
}
}
?>