انجمن


مشکل با قالب ای طرح  (۲ نوشته)

  • sajjadn9000

    آفلاین
    عضو
    تعداد نوشته‌ها: ۲۵
    # نوشته شده: ۱۲ سال پیش
    ۲۶ آبان ۱۳۹۰ - ۱۱:۵۸

    ببخشید بین پست 1 و 2 سایتم این ارور میاد :

    Warning: array_slice() expects parameter 1 to be array, null given in /home/u724574429/public_html/wp-content/themes/wp-theme-iTarh/index.php on line 33

    ادرس سایتم : http://joojack-dl.tk/
    هم اکنون نیاز مند یاریتان هستیم
    اینم فایل ایندکس:

    <?php get_header(); ?>
    
    <div id="rightcol">
    <?php include(TEMPLATEPATH."/line1.php");?>
    </div>
    
    <div id="leftcol">
    <?php include(TEMPLATEPATH."/line2.php");?>
    </div>
    
    <div id="centercol">
    
    <?php include(TEMPLATEPATH."/468.php");?>   	   	    
    
    <?php $count=count+1; ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div id="entry">
    
    <!--rss-->
    <?php if ($count == 2) : ?>
    <div class="linkdoni">
    <?php // Get RSS Feed(s)
    include_once(ABSPATH . WPINC . '/rss.php');
    $rss = fetch_rss('http://blog.itarh.ir/?feed=rss2');
    $maxitems = 8;
    $items = array_slice($rss->items, 0, $maxitems);
    ?>
    </div> 
    
    <?php endif; $count++; ?>
    <!--/rss-->
    
    <!--post-->
    
    <div class="title-center">
    <b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b> - تاریخ ارسال : <?php the_time(__('F jS, Y','kubrick')) ?>
    </div>
    
    <div class="top-center">
    موضوع : <?php the_category(__(', ','kubrick')) ?><br/>
    <?php if(function_exists('the_views')) { the_views(); } ?>  
     نویسنده : <?php the_author_posts_link(); ?>  
     <?php comments_popup_link(__('بدون نظر ','kubrick'), __('یک نظر','kubrick'), __('% نظر ','kubrick')); ?>
      
    ارسال در حدود <?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' قبل'; ?>
    </div>
    
    <div class="main-center">
    <?php the_content('<div id="hidden">{...}</div>'); ?>
    </div>
    
    <div style="text-align: right;"><img src="images/point.gif" alt="more" /> مشاهده ی ادامه ی مطلب <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
    
    <div class="bottom-center">
    <?php the_tags(__('برچسب ها : ','kubrick'), ', ', '<br />'); ?>
    </div>
    
    <!--/post-->
    
    </div>
    <?php endwhile; else: ?><?php endif; ?>
    
    <!--last-->
    <div class="linkdoni">
    <ul>
    <?php
    	$al_post = get_posts( 'numberposts=10' );
    	if( $al_post ) :
    	foreach( $al_post as $post ) :
    	setup_postdata( $post );
    	?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    	<?php endforeach; ?>
    	<?php endif; ?>
    </ul>
    </div> 
    
       </div>
    
    <?php get_footer(); ?>
  • Morteza

    آفلاین
    ناظم
    تعداد نوشته‌ها: ۳۴۰۲
    تشکر شده: ۳۱۲۸ بار
    # نوشته شده: ۱۲ سال پیش
    ۲۶ آبان ۱۳۹۰ - ۱۳:۱۱

    تست کنید :

    <?php get_header(); ?>
    
    <div id="rightcol">
    <?php include(TEMPLATEPATH."/line1.php");?>
    </div>
    
    <div id="leftcol">
    <?php include(TEMPLATEPATH."/line2.php");?>
    </div>
    
    <div id="centercol">
    
    <?php include(TEMPLATEPATH."/468.php");?>   	   	    
    
    <?php $count=count+1; ?>
    
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    <div id="entry">
    
    <!--post-->
    
    <div class="title-center">
    <b><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></b> - تاریخ ارسال : <?php the_time(__('F jS, Y','kubrick')) ?>
    </div>
    
    <div class="top-center">
    موضوع : <?php the_category(__(', ','kubrick')) ?><br/>
    <?php if(function_exists('the_views')) { the_views(); } ?>
     نویسنده : <?php the_author_posts_link(); ?>
     <?php comments_popup_link(__('بدون نظر ','kubrick'), __('یک نظر','kubrick'), __('% نظر ','kubrick')); ?>
    
    ارسال در حدود <?php echo human_time_diff(get_the_time('U'), current_time('timestamp')) . ' قبل'; ?>
    </div>
    
    <div class="main-center">
    <?php the_content('<div id="hidden">{...}</div>'); ?>
    </div>
    
    <div style="text-align: right;"><img src="images/point.gif" alt="more" /> مشاهده ی ادامه ی مطلب <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div>
    
    <div class="bottom-center">
    <?php the_tags(__('برچسب ها : ','kubrick'), ', ', '<br />'); ?>
    </div>
    
    <!--/post-->
    
    </div>
    <?php endwhile; else: ?><?php endif; ?>
    
    <!--last-->
    <div class="linkdoni">
    <ul>
    <?php
    	$al_post = get_posts( 'numberposts=10' );
    	if( $al_post ) :
    	foreach( $al_post as $post ) :
    	setup_postdata( $post );
    	?>
    <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    	<?php endforeach; ?>
    	<?php endif; ?>
    </ul>
    </div> 
    
       </div>
    
    <?php get_footer(); ?>
    کاربران زیر به‌خاطر این نوشته تشکر کرده‌اند:
    sajjadn9000

درباره‌ی این موضوع



برچسب‌ها

هیچ برچسبی نیست.