Hata günlüklerini incelediniz mi? Nerede hata verdiğini bilirsek ona göre yorumlama yapması daha kolay ve hızlı olur.
Aşağıdaki kod satırını şuan aktif olarak sıkıntısız kullanmaktayım.
<?php
$args = array('numberposts'=>5, 'category'=>get_cat_id(fs_get_option('oyun')));
$oyunlar = get_posts( $args ); $i=0;
foreach( $oyunlar as $post ) : $i++; setup_postdata($post);
echo ' <li><a href="'.get_permalink().'"><span class="imgalan"><cite class="nokta"><span class="farkliSayfa links"></span></cite>';
if ( has_post_thumbnail()) :
the_post_thumbnail( 'post2', array('class' => '', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' ));
elseif (get_post_meta($post->ID, 'resim', true) != '') :
echo '<img src="'.get_post_meta($post->ID, 'resim', true).'" alt="'.get_the_title().'" width="70" height="125" />'; else : echo '<img src="'.get_bloginfo('template_url').'/images/nothumb.jpg" width="70" height="125" alt="'.get_the_title().'" />';
endif;
echo '</span><span class="yazialan">'; if (strlen($post->post_title) > 40) { echo mb_substr(the_title($before = '', $after = '', FALSE), 0, 40) . '...'; } else {the_title(); } echo '</span></a></li>
';
endforeach;
?>
[22-Nov-2016 12:06:08 UTC] PHP Fatal error: Call to undefined function fs_get_option() in /home/nhbdiziv/public_html/wp-content/themes/dizivfilm/index.php on line 39
Bu Hatayı vermekde
Suan index kodları şu şekilde
site
http://www.dizivfilm.com/ <?php get_header(); ?>
<div class="filmslider">
<ul id="foo2">
<?php query_posts('v_sortby=ID&v_orderby=asc&posts_per_page=14'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
<a href="<?=the_permalink()?>" title="<?=the_title();?>" class="hovertype">
<?php if(function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(225,295)); } ?>
</a>
<div class="sliderdil"><?php echo get_the_term_list($post->ID, 'dil'); ?></div>
<div class="sliderimdb">IMDB:<?=get_the_term_list($post->ID, 'imdb')?></div>
</li>
<?php endwhile; else: endif; wp_reset_query(); ?>
</ul>
<div class="clearfix"></div>
<a id="prev2" class="prev" href="#"> </a>
<a id="next2" class="next" href="#"> </a>
</div>
<div class="beyazsayfa">
<div class="clear"></div>
<div class="solkisim">
<div class="baslik">Son Eklenen Filmler</div>
<ul>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<li>
<div class="filmresimi">
<a href="<?=the_permalink()?>" title="<?=the_title();?>" class="hovertype">
<?php if(function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(225,295)); } ?>
</a>
<div class="sergilemedil"><?=get_the_term_list($post->ID, 'dil')?></div>
<div class="sergilemeimdb">İMDB:<?=get_the_term_list($post->ID, 'imdb')?></div>
</div>
<div class="filmadi"><a href="<?=the_permalink()?>" alt="<?=the_title();?>" title="<?=the_title();?>"><?php kisa_baslik(22); ?>...</a></div>
</li>
</ul>
<!-- Özel alan başladı -->
<?php
$args = array('numberposts'=>5, 'category'=>get_cat_id(fs_get_option('oyun')));
$oyunlar = get_posts( $args ); $i=0;
foreach( $oyunlar as $post ) : $i++; setup_postdata($post);
echo ' <li><a href="'.get_permalink().'"><span class="imgalan"><cite class="nokta"><span class="farkliSayfa links"></span></cite>';
if ( has_post_thumbnail()) :
the_post_thumbnail( 'post2', array('class' => '', 'alt' => ''.get_the_title().'', 'title' => ''.get_the_title().'' ));
elseif (get_post_meta($post->ID, 'resim', true) != '') :
echo '<img src="'.get_post_meta($post->ID, 'resim', true).'" alt="'.get_the_title().'" width="70" height="125" />'; else : echo '<img src="'.get_bloginfo('template_url').'/images/nothumb.jpg" width="70" height="125" alt="'.get_the_title().'" />';
endif;
echo '</span><span class="yazialan">'; if (strlen($post->post_title) > 40) { echo mb_substr(the_title($before = '', $after = '', FALSE), 0, 40) . '...'; } else {the_title(); } echo '</span></a></li>
';
endforeach;
?>
<!-- Özel alan bitti -->
<?php endwhile; ?>
<?php else: ?>
<div class="clear"></div>
Sayfa Bulunamadı !
<?php endif; ?>
<?php sayfalama(); ?>
</div>
<div class="sagkisim">
<?php get_sidebar(); ?>
</div>
<div class="clear"></div>
<div class="clear15"></div>
</div>
<?php get_footer(); ?>