Wordpress存档页面无法加载

时间:2013-08-21 04:34:34

标签: php html wordpress content-management-system

我有一个问题,现在确实让我很生气!我在我的主题中创建了一个archive.php页面,我提出了两个条件。一个用于标题,一个用于主循环。但浏览器无法加载页面和错误“加载网页时出现问题”。我该怎么办?请帮我。这是我的archive.php代码: (主要问题是在div#posts-wrapper中发生的第二个循环/条件,因为当我删除它时,页面可以工作。)

<?php

/*
|   This is the cateogry page that when a user clicks on a category.
|    This file is for the Behdis Marketing Group Wordpress Theme
*/
?>
<?php
    get_header();
?>
<div class='grid-container' style='background-color: #FFF; border: 2px #CCC solid; padding-bottom: 50px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px;'> <!-- Body section -->

                <div class='grid-100 grid-parent height-auto'> <!-- Bodt-container -->

                    <aside id='left_sidebar' class='grid-20  height-auto'> <!-- Left sidebar -->
                    <?php
                        // including left sidebar                       
                        get_sidebar('left');
                    ?>            
                    </aside><!-- End of left sidebar -->


                    <div id='center_column' class='grid-60 height-auto'><!-- End of center bar -->
                    <!-- this includes slideshow as well as six others thumbnails at the bottom of slideshow frame -->
                        <div class='archive-page-title font-nazanin dir-right'>
                        <?php
                            if ( have_posts() )
                            { 
                                if( is_tag() ) 
                                 { 
                                     $title = ('Tag Posts:  ' . single_tag_title('', FALSE));
                                     echo create_h1($title);
                                 }

                                 if( is_category() ) 
                                 { 
                                     $title = ('Cateogry Posts:  ' . single_cat_title('', FALSE));
                                     echo create_h1($title);
                                  }         
                            }
                            ?>
                         </div> 
                         <div id='posts-wrapper' class='archive-page-posts-wrapper font-nazanin dir-right margin-auto'>
                        <?php                           
                            rewind_posts();
                             if ( have_posts() )
                            { 
                            while(have_posts() )
                            {
                                         if( is_tag() ) 
                                         { 
                                             create_post(true, 'each-post-article');
                                         }                             
                                         if( is_category() ) 
                                         { 
                                             create_post(true, 'each-post-article');
                                          }  
                            }
                            }

                            ?>
                         </div> 
                    </div><!-- End of center bar -->

                    <aside id='right_sidebar' class='grid-20 height-auto'><!-- End of right sidebar -->                                     
                    <?php
                        get_sidebar('right');
                    ?>
                    </aside><!-- End of right sidebar -->

                </div><!-- End of body-container -->

</div><!-- End of body section -->
<!-- End of basic template              
<?php
    get_footer();
?>

0 个答案:

没有答案