Yunus emre ye teşekkür edebilirsin ustad..
bu php kodlarını single.php ye ekle , css kodlarını da style.css ye , canavar gibi çıkacak
<!-- benzer yazılar son -->
<div class="baslikblok">Benzer Yazılar</div>
<ul class="benzerler">
<?php
$categories = get_the_category($post->ID);
if ($categories) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
$args=array(
'category__in' => $category_ids,
'post__not_in' => array($post->ID),
'showposts'=>4, // Gösterilecek benzer yazi sayisi
'caller_get_posts'=>1
);
$my_query = new wp_query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) {
$my_query->the_post();
?>
<li>
<?php if (function_exists('has_post_thumbnail')) {
if ( has_post_thumbnail() ) { ?>
<div class="thumb4">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
<p><?php kisa_baslik(); ?></p>
</div>
<?php } } ?>
</li>
<?php
}
echo '<div class="temizle"></div>';
}
wp_reset_query();
}
?>
<!-- benzer yazılar son -->css
ul.benzerler{ float:left; margin:10px 0px 0px 10px; padding:0px;}
ul.benzerler li{ list-style:none; float:left; padding:0px 5px 10px 5px; }
.baslikblok{ font-weight:bold; min-height:30px; line-height:30px; font-size: 11px; margin: 0px 13px 0px 15px; padding-left:20px; color: #7e7e7e; text-decoration: none; text-shadow: 0 1px #fff; background: #f3f3f3; -webkit-box-shadow: inset 0px 0px 2px #fff; -moz-box-shadow: inset 0px 0px 2px #fff; box-shadow: inset 0px 0px 2px #fff; border: 1px solid #DFDFDF; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}
Fatal error: Call to undefined function kisa_baslik() in hocam şöyle bi hata verdi nasıl düzeltebilirim