页脚仅显示在single.php页面上

时间:2013-11-18 23:51:05

标签: php wordpress wordpress-theming footer

我正在研究本地服务器上的wordpress主题,并遇到了一个我无法弄清楚的障碍。除了single.php页面之外,页脚会被拉入每个页面。我不知道是怎么回事。这是我的single.php代码

  <?php
/**
 * The Template for displaying all single posts.
 *
 * @package turbosaurus
 */

get_header(); ?>


<script>
  $(document).ready(function(){
    // Target your .container, .wrapper, .post, etc.
    $(".container").fitVids();
  });
</script>



    <div class="magazine-head" style="background:url('<?php the_field('featured_image'); ?>') fixed;">

        <div class="container">
            <div class="row">
                <div class="col-xs-12 col-sm-12 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2">
                <header id="myAffix" class="entry-header">
                    <div class="entry-meta">
                    <p><?php the_time('l, F jS, Y') ?> </p>
                </div><!-- .entry-meta -->
                <h1 class="entry-title"><?php the_title(); ?></h1>
                <div class="tag-container">
                    <span class="category-span">
                        <?php the_category(' '); ?>
                    </span>
                    <?php the_tags( '', $sep, $after ); ?> 
                </div>


                </header><!-- .entry-header -->
                </div>
            </div>
        </div>
    </div>

    <div id="primary" class="content-area container">
            <div class="row">
            <div class="col-xs-12 col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-8 col-lg-offset-2 article-wrap">
        <main id="main" class="site-main" role="main">

        <?php while ( have_posts() ) : the_post(); ?>

            <?php get_template_part( 'content', 'single' ); ?>

            <?php turbosaurus_content_nav( 'nav-below' ); ?>

            <?php
                // If comments are open or we have at least one comment, load up the comment template
                if ( comments_open() || '0' != get_comments_number() )
                    comments_template();
            ?>

        <?php endwhile; // end of the loop. ?>

        </main><!-- #main -->
            </div>
            </div>
    </div><!-- #primary -->


<?php get_footer(); ?>

我愿意提供你需要的任何其他东西来帮助我解决这个问题。谢谢你的时间。

0 个答案:

没有答案