为什么我会意外结束?

时间:2011-02-12 03:01:39

标签: php

    <?php
        $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => -1)); 
        while ( $loop->have_posts() ) : $loop->the_post();

        $custom = get_post_custom($post->ID);
        $special_notes = $custom["special_notes"][0];
        $website_url = $custom["website_url"][0];
        $view_more = $custom["view_more"][0];
    ?>

    <article class="project">
        <section class="thumbnail">
            <?php the_post_thumbnail(); ?>
            <section class="description">
                <hgroup>
                    <h2><?php the_title(); ?></h2>
                    <h3>
                        <?php
                        $terms_as_text = get_the_term_list( $post->ID, 'Skills', '', ', ', '' ) ;
                        echo strip_tags($terms_as_text);
                        ?>
                    </h3>
                </hgroup>
                <?php the_content(); ?>
                <p class="star"><?=$special_notes?></p>
                <span>
                    <?php if (!empty($website_url)) { echo 'Launch <a href="' . $website_url . '" target="_blank">Website<a>' ?> | Read <a href="<?=$view_more?>" target="_blank">more</a> about this project
                </span>
            </section>
        </section>
    </article>

    <?php endwhile; ?>

</section>

我在第35行意外结束。有人可以帮助我吗?

2 个答案:

答案 0 :(得分:1)

第29行遗失},是我的猜测。

答案 1 :(得分:0)

第29行上的支撑不匹配;你不要关闭你的if {。