İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

Functions.php hatası acil!

EmPa

0
İyinet Üyesi
Katılım
30 Mayıs 2011
Mesajlar
4
Reaction score
0
Functions.php'de bileşen ekliyordum bir hata verdi ama bileşenle alakası yok
confused.gif

Hata:
PHP:
Parse error:  syntax error, unexpected T_STRING in  /home/kemre/public_html/demo/wp-content/themes/FaktorWP/functions.php on  line 16
Functions.php:
PHP:
<?php



//Öne Çıkarılmış Görsel

add_theme_support( 'post-thumbnails' );

set_post_thumbnail_size( 610 , 9999 );



//Yan Menü

if ( function_exists('register_sidebar') )

    register_sidebar(array(

        'before_widget' => '<aside>',

        'after_widget' => '</ul></aside>',

        'before_title' => '<h2>',

        'after_title' => '</h2><ul>',

    ));



?>
<?php
/* Çift Sütunlu Kategoriler Bileşeni */
 
add_action( 'widgets_init', 'cat_widgets' );
 
function FaktorWP_cat_widgets() {
 register_widget( 'cat_widget' );
}
 
class FaktorWP_cat_widget extends WP_Widget {
 
function FaktorWP_cat_widget() {
 
 /* Widget settings */
 $widget_ops = array( 'classname' => 'widget_cat', 'description'  => __('Bu Bileşen ile kategorileri çift sütunlu bir şekilde  kullanabilirsiniz.', 'FaktorWP') );
 
/* Create the widget */
 $this->WP_Widget( 'cat_widget', __('Çift Sütunlu Kategoriler', 'FaktorWP'), $widget_ops );
 }
 
function widget( $args, $instance ) {
 
 ?>
     <aside>

        <?php

$cats = explode("<br />",wp_list_categories('title_li=&echo=0&depth=1&style=none'));

$cat_n = count($cats) - 1;

for ($i=0;$i<$cat_n;$i++):

if ($i<$cat_n/2):

$cat_left = $cat_left.'<li>'.$cats[$i].'</li>';

elseif ($i>=$cat_n/2):

$cat_right = $cat_right.'<li>'.$cats[$i].'</li>';

endif;

endfor;

?>

        <h2>Kategoriler</h2>

        <ul class="left">

        <?php echo $cat_left;?>

        </ul>

        <ul class="right">

        <?php echo $cat_right;?>

        </ul>

        </aside>
 <?php
 echo $after_widget;
 }
 
function update( $new_instance, $old_instance ) {}
 
function form( $instance ) {
 
 $instance = wp_parse_args( (array) $instance, $defaults ); ?>
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

Üst