解析错误:语法错误,意外'<'在第13行的/home3/fireball/public_html/wp-content/themes/twentyfourteen/page.php中

时间:2014-07-20 17:29:09

标签: php jquery html css wordpress

不确定什么是错的。我已经看过并猜测它的PHP就是这么做的。我看过这个发布但无法找到修复。

很难在这里发帖'*用于显示所有页面的模板

*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages and that
* other 'pages' on your WordPress site will use a different template.
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0




<?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that
 * other 'pages' on your WordPress site will use a different template.
 *
 * @package WordPress
 * @subpackage Twenty_Fourteen
 * @since Twenty Fourteen 1.0
 */
 <div id="main-content" class="main-content">
<?php
if ( is_front_page() && twentyfourteen_has_featured_posts() ) {
    // Include the featured content template.
    get_template_part( 'featured-content' );
}
?>
<div id="primary" class="content-area">
    <div id="content" class="site-content" role="main">

        <?php
            // Start the Loop.
            while ( have_posts() ) : the_post();

                // Include the page content template.
                get_template_part( 'content', 'page' );

                // If comments are open or we have at least one comment, load up the    comment     template.
                if ( comments_open() || get_comments_number() ) {
                    comments_template();
                }
            endwhile;
        ?>

    </div><!-- #content -->
</div><!-- #primary -->
<?php get_sidebar( 'content' ); ?>
</div><!-- #main-content -->

<?php
get_sidebar();
get_footer();

1 个答案:

答案 0 :(得分:1)

在注释掉的代码的初始块的最后一行关闭php标记。它应该是这样的:

<?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages and that
 * other 'pages' on your WordPress site will use a different template.
 *
 * @package WordPress
 * @subpackage Twenty_Fourteen
 * @since Twenty Fourteen 1.0
 */ ?>
 <div id="main-content" class="main-content">