Php 新单篇文章的样式与第一篇Wordpress文章的样式不同

Php 新单篇文章的样式与第一篇Wordpress文章的样式不同,php,html,css,wordpress,Php,Html,Css,Wordpress,出于某种原因,唯一一个样式正确的“单一”帖子是第一个示例帖子。当我添加一篇新文章时,我的侧边栏会显示在内容下方,而我的评论部分根本不会显示 这是我用新内容编辑的第一篇“默认”帖子(hello world),样式正确: 下面是第二篇文章的样子(这是不正确的),评论部分甚至没有显示出来 这是我的single.php <?php get_header(); ?> <section id="single-post-feed" class="container-fluid">

出于某种原因,唯一一个样式正确的“单一”帖子是第一个示例帖子。当我添加一篇新文章时,我的侧边栏会显示在内容下方,而我的评论部分根本不会显示

这是我用新内容编辑的第一篇“默认”帖子(hello world),样式正确:

下面是第二篇文章的样子(这是不正确的),评论部分甚至没有显示出来

这是我的
single.php

<?php get_header(); ?>

<section id="single-post-feed" class="container-fluid">
  <div class="article-container">

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

            get_template_part( 'template-parts/content-page', get_post_format() ); 

            the_post_navigation();

            // moved the comments_template() to content-page.php

        endwhile; // End of the loop.
        ?>

    </div>

</section>
<?php get_footer(); ?>
<?php

//Advanced custom Fields
$song_lyrics = get_field('song_lyrics');
$artist_name = get_field('artist_name');
$song_title = get_field('song_title');
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    <header class="entry-header">
        <div class="album-artwork-single-post">
        <div class="album-overlay">
            <div class="media-play-btn-container" id="play-pause-toggle">
                <div class="play-pause-ring"></div>
                <a id="media-toggle" href=""><i class="icon ion-ios-play"></i></a>
            </div>
            <div class="artist-track-title-container">
                <div class="artist-name-heading">
                    <?php echo $artist_name ?>
                </div>
                <div class="track-name-heading">
                    <?php echo $song_title ?>
                </div>
            </div>
        </div>
        <div class="sc-artwork">
            <?php the_post_thumbnail(); ?>
        </div>
    </div>
    <div class="info-section">
        <div class="curator-profile-pic-overlay">
            <div class="curator-pic-container">
                                <?php echo get_avatar(get_the_author_meta('ID'), '64'); ?>
                                <?php echo get_avatar(get_the_author_meta('ID'), '80'); ?>
                <!-- <img class="curator-prof-pic" src="" alt="Profile Picture"> -->
            </div>
        </div>
        <div class="btn-curator-container">
            <button type="button" class="btn btn-default  dig-btn"><span class="glyphicon glyphicon-flash"></span><span class="dig-text">Dig</span></button>
            <button type="button" class="btn btn-default  download-btn"><span class="download-text">Download</span></button>
        </div>
        <div class="profile-container">
            <div class="curator-alias">
                <i class="glyphicon glyphicon-ok-circle verified-check"></i><?php the_author();?>
            </div>
            <div class="curator-class">Curator </div>

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

    <div class="entry-content">
    <div class="horiz-sep-bar"></div>
    <div class="the-review">
        <div class="the-review-header">
            WHAT CURATORS ARE SAYING
        </div>
        <div class="the-review-content">
                    <?php
                        the_content();

                        wp_link_pages( array(
                            'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'uncvrd' ),
                            'after'  => '</div>',
                        ) );
                    ?> <span class="curator-credit"> &#58;&#58;  <a class="curator-username" href="#"><?php the_author();?></a></span>
        </div>
        <div class="post-genre-boxes">
                    <?php
                    foreach(get_the_category() as $category)
                    {
                            echo '<a href="'.get_category_link($category->cat_ID).'"><button type="button" class="btn btn-outline-secondary post-genre"><span class="post-genre-text"> '.$category->cat_name.'</span></button></a>';
                    }
                    ?>
        </div>
    </div>
    <div class="horiz-sep-bar"></div>
    <div class="lyrics-container">
        <button class="lyrics-button">
            <a data-toggle="collapse" id="lyric-toggle" href="#collapse1"><i class="icon ion-chevron-down"></i>LYRICS</a>
        </button>

        <div class="lyrics-content" id="lyrics-dropdown">

            <?php echo $song_lyrics ?>

        </div>
    </div>
    <div class="horiz-sep-bar"></div>
    <div class="horiz-sep-bar-white"></div>
    <div class="artist-hub">
        <div class="artist-profile-pic">
            <div class="prof-pic-container">
                <img class="sc-prof-pic" src="https://i1.sndcdn.com/avatars-000280531684-6vslia-t500x500.jpg" alt="">
            </div>
        </div>
        <div class="about-track-title">
            ABOUT "<?php echo $song_title ?>"
        </div>
        <div class="artist-name-hub">
            <?php echo $artist_name ?>
        </div>
        <div class="track-details">
            Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima minus tempore distinctio asperiores voluptatum, hic doloremque ipsum! Perspiciatis ratione aliquam quis porro aliquid provident hic, reprehenderit, voluptates quas? Magnam, facere.Lorem ipsum dolor sit amet, consectetur adipisicing elit.
            <div class="stats-socials-container">
                <i class="icon ion-ios-bolt balanced"></i>
                <div class="total-number-digs">14,395</div>
                <div class="artist-social-buttons">
                    <a href=""><i class="icon ion-social-facebook"></i></a>
                    <a href=""><i class="icon ion-social-twitter"></i></a>
                    <a href=""><i class="icon ion-social-instagram"></i></a>
                </div>
            </div>
        </div>
    </div>

    <div class="ad-box-above-comments">
        <div class="ad-box">
            <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
            <!-- UNCVRD Website -->
            <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-2215550501221227" data-ad-slot="9389394438" data-ad-format="auto"></ins>
            <script>
                (adsbygoogle = window.adsbygoogle || []).push({});

            </script>
        </div>
    </div>
                        <?php
                            // If comments are open or we have at least one comment, load up the comment template.
                            if ( comments_open() || get_comments_number() ) :
                                comments_template();
                            endif;
                        ?>
        </div>
    </div><!-- .entry-content -->

    <section id="side-bar">
        <?php get_sidebar(); ?>
    </section>
</article><!-- #post-## -->

让我知道你还需要什么,我可以更新帖子,谢谢

“你检查过你的部门是否正确关闭了吗?”RajKumarBhardwaj问得好。看起来侧边栏部分正上方的结束div没有链接到
content page.php
上的任何内容,但是当我将其从文档中取出时,原始帖子(最初样式正确)和第二篇帖子都存在侧边栏问题。第二篇文章仍然没有评论部分。你能提供两篇文章的链接吗?@RajKumarBhardwaj目前正在本地主机上开发,我能把php文件压缩共享给你吗?这个压缩共享包含我正在开发的Wordpress主题“uncvrd”,如果你有任何问题,请告诉我:@RajKumarBhardwaj