سلام. وقت بخیر. من یه قالب اماده که اتفاقا از همینجا دانلود کردم و روی وردپرسم بارگزاری کردم و به خوبی نصب شده اما وقتی سایت اجرا میشه میگه تو خط 13 مشکل داره. منم تقریبا دو سال هست که دست به php نزدم واسه همین خیلی خوب یادم نیست اگه راهنمایی ام کنید ممنون میشم. کد صفحه ایندکس هم براتون گذاشتم.
<?php get_header(); ?> <!--content --> <article id="content"> <div class="ic">قالب های بیشتر وبسایت در وبسایت رویین موجود است</div> <ul> <?php $th_rightmenu_options=get_option('th_rightmenu_options'); ?> <?php $mainshown=0; $portfolioshown=0; $servicesshown=0; $contactshown=0; foreach ($th_rightmenu_options as $key => $value) { if(substr( $key, strlen($key)-5, strlen($key) ) != "title" ) { if($value=='page_Home') { if(!$mainshown) { $mainshown=1; ?> <li id="page_Home"> <div class="box1"> <div class="inner"> <a href="#" class="close" data-type="close"><span></span></a> <div class="wrapper pad_bot1"> <div class="col1"> <?php $th_mainpage_options=get_option('th_mainpage_options'); ?> <h2><?php echo $th_mainpage_options['topright_title']; ?></h2> <figure><img src="<?php echo $th_mainpage_options['topright_img']; ?>" alt="" class="pad_bot1"></figure> <p class="pad_bot1"><?php echo $th_mainpage_options['topright_text']; ?></p> </div> <div class="col1 pad_right1"> <h2>خبر ها</h2> <div class="wrapper"> <span class="date"><strong><?php echo $th_mainpage_options['news1_day']; ?></strong><span><?php echo $th_mainpage_options['news1_month']; ?></span></span> <div class="col2"> <p class="pad_bot2 color1"><strong><?php echo $th_mainpage_options['news1_title']; ?></strong></p> <p class="pad_bot1"><?php echo $th_mainpage_options['news1_text']; ?></p> </div> </div> <div class="wrapper"> <span class="date"><strong><?php echo $th_mainpage_options['news2_day']; ?></strong><span><?php echo $th_mainpage_options['news2_month']; ?></span></span> <div class="col2"> <p class="pad_bot2 color1"><strong><?php echo $th_mainpage_options['news2_title']; ?></strong></p> <p class="pad_bot1"><?php echo $th_mainpage_options['news2_text']; ?></p> </div> </div> </div> </div> <h2><?php echo $th_mainpage_options['bottom_title']; ?></h2> <div class="wrapper"> <?php echo $th_mainpage_options['bottom_text']; ?> </div> </div> </div> </li> <?php } } elseif($value=='page_Portfolio') { if(!$portfolioshown) { $portfolioshown=1; ?> <li id="page_Portfolio"> <div class="box1"> <div class="inner"> <a href="#" class="close" data-type="close"><span></span></a> <div class="wrapper tabs"> <div class="col1"> <h2>موضوعات</h2> <ul class="nav" id="portfolio"> <?php $taxonomy = 'gallerycat'; $terms = get_terms($taxonomy); if ( $terms && !is_wp_error( $terms ) ) : ?> <?php foreach ( $terms as $term ) { ?> <li><a href="#<?php echo $term->slug; ?>"><span></span><strong><?php echo $term->name; ?></strong></a></li> <?php } ?> <?php endif;?> </ul> </div> <div class="col2 pad_right1"> <?php foreach ( $terms as $term ) { ?> <div class="tab-content" id="<?php echo $term->slug; ?>"> <h2><?php echo $term->name; ?></h2> <?php $newargs = array( 'post_type' => 'gallery', 'tax_query' => array( array( 'taxonomy' => 'gallerycat', 'field' => 'slug', 'terms' => $term->slug ) ) ); $control=0; query_posts( $newargs ); if (have_posts()) : while (have_posts()) : the_post(); $feat_image_thumb = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()),'medium'); $feat_image = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()),'full'); if($control%2==0) { ?> <div class="wrapper"> <figure class="left marg_right1"><a href="<?php echo $feat_image[0];?>" class="lightbox-image" data-type="prettyPhoto[group2]"><span></span><img width="190" height="120" src="<?php echo $feat_image_thumb[0]; ?>" style="border: 5px #fff solid;" alt=""></a></figure> <?php } else{ ?> <figure class="left"><a href="<?php echo $feat_image[0];?>" class="lightbox-image" data-type="prettyPhoto[group2]"><span></span><img width="190" height="120" src="<?php echo $feat_image_thumb[0];?>" style="border: 5px #fff solid;" alt=""></a></figure> </div> <?php } $control++; ?> <?php endwhile; if($control%2==1) { ?> </div> <?php } endif; ?> </div> <?php } ?> </div> </div> </div> </div> </li> <?php } } elseif($value=='page_Services') { if(!$servicesshown) { $servicesshown=1; ?> <li id="page_Services"> <div class="box1"> <div class="inner"> <a href="#" class="close" data-type="close"><span></span></a> <?php $th_services_options=get_option('th_services_options'); ?> <h2><?php echo $th_services_options['services_title']; ?></h2> <?php $newargs = array( 'post_type' => 'services' ); query_posts( $newargs ); if (have_posts()) : while (have_posts()) : the_post(); $feat_image_thumb = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()),'medium'); ?> <div class="wrapper pad_bot3"> <figure class="left marg_right1"><img width="220" src="<?php echo $feat_image_thumb[0]; ?>" alt=""></figure> <p class="color1 pad_bot2"><strong><?php the_title(); ?></strong></p> <p><?php the_content(); ?></p> </div> <?php endwhile; endif; ?> </div> </div> </li> <?php } } elseif($value=='page_Contact') { if(!$contactshown) { $contactshown=1; ?> <li id="page_Contact"> <div class="box1"> <div class="inner"> <a href="#" class="close" data-type="close"><span></span></a> <div class="wrapper"> <div class="col1"> <h2>اطلاعات تماس</h2> <?php $th_contact_options=get_option('th_contact_options'); ?> <p><?php echo $th_contact_options['contact_name'] ?></p> <?php echo $th_contact_options['contact_address'] ?><br> <p class="cols"> <?php if($th_contact_options['contact_tel']){ ?> تلفن:<br> <?php } if($th_contact_options['contact_fax']){ ?> فکس:<br> <?php } if($th_contact_options['contact_email']) { ?> ایمیل:</p> <p><?php } if($th_contact_options['contact_tel']){ echo $th_contact_options['contact_tel'] ?><br> <?php } if($th_contact_options['contact_fax']){ echo $th_contact_options['contact_fax'] ?><br> <?php } if($th_contact_options['contact_email']) {?> <a href="mailto:" class="link1"><?php echo $th_contact_options['contact_email'] ?></a> <?php } ?> </p> </div> <div class="col1 pad_right1"> <?php if($th_contact_options['contact_map']) { ?> <h2>مکان ما در نقشه</h2> <?php echo $th_contact_options['contact_map']; }?> </div> </div> <?php if($th_contact_options['contactform']) { ?> <h2>فرم تماس</h2> <?php echo do_shortcode($th_contact_options['contactform']); ?> <?php } ?> </div> </div> </li> <?php } } else { ?> <li id="<?php echo $value; ?>"> <div class="box1"> <div class="inner"> <a href="#" class="close" data-type="close"><span></span></a> <?php $post = get_post($value); $title = $post->post_title; $content = $post->post_content; ?> <h2><?php echo $title; ?></h2> <?php echo $content; ?> </div> </div> </li> <?php } } } ?> </ul> </article><!-- / content --> </div> </div> <div class="block"></div> </div> <div class="bg1"> <div class="main"><?php get_footer(); ?>