页脚不会仅显示在single.php页面上
目前我正在本地服务器上用wordpress开发一个主题,遇到了一个我无法解决的问题。除了single.php页面外,页脚会被拉入每个页面。我不知道发生了什么事。这是我的single.php代码页脚不会仅显示在single.php页面上,php,wordpress,wordpress-theming,footer,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(
<?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(); ?>
$(文档).ready(函数(){
//以.container、.wrapper、.post等为目标。
$(“.container”).fitVids();
});
运行此程序时,是否会看到single.php
文件的末尾?如果没有,代码可能会自动失败(感谢显示错误)是的。。。您是否看到了所有正确显示的内容?如果有评论,你看到了吗?所有的div都出现了吗?我现在没有看到任何评论,但是页面一直显示到最后。还有什么其他信息我可以和你们分享吗?问题可能在于你们文章的内容。通过删除帖子的所有内容、发布/更新,然后查看来测试这一点。如果页脚呈现,则表示标记未正确关闭。好主意!尽管如此,还是没有任何结果。我想我只是要在原始模板上一块一块地开始整个主题,看看它在哪里断裂。有点糟糕,但我不知道还能做什么。