我的侧边栏中的页脚

时间:2017-03-24 18:34:35

标签: wordpress footer sidebar

我已经阅读了SOF上的其他答案,但无法找出我的错误所在。在我的主页和其他选择没有侧边栏的页面上,页脚信用会向上移动到我的网站一侧! :(

已添加4/11/17:

这是footer.php:

   <div class="site-info">
Proudly created by <a href="http://www.twitter.com/officialryguy">Ryan Anderson</a>
<br>
<a href="http://www.officialryguy.com/privacy-policy/">Privacy Policy</a>       
    </div><!-- .site-info -->

这是我最近创建的可能有问题的index.php吗?

get_header(); ?>

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">

    <?php if ( have_posts() ) : ?>

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

            <?php

                /*
                 * Include the Post-Format-specific template for the content.
                 * If you want to override this in a child theme, then include a file
                 * called content-___.php (where ___ is the Post Format name) and that will be used instead.
                 */
                get_template_part( 'template-parts/content', get_post_format() );
            ?>

        <?php endwhile; ?>

        <?php the_posts_navigation(); ?>

    <?php else : ?>

        <?php get_template_part( 'template-parts/content', 'none' ); ?>

    <?php endif; ?>

    </main><!-- #main -->
</div><!-- #primary -->
<?php if (!is_front_page()) {
get_sidebar();
} ?>
<?php get_footer(); ?>

1 个答案:

答案 0 :(得分:0)

找到我需要的东西。需要添加样式表才能停止浮动:

.site-info {
clear: both
}