【问题标题】:Footer in my sidebar我的侧边栏中的页脚
【发布时间】:2017-08-17 19:48:07
【问题描述】:

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

于 2017 年 4 月 11 日添加:

这是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(); ?>

【问题讨论】:

  • 发布您的代码!
  • 抱歉 Sumon,已在上面添加。菜鸟搬家,我知道,菜鸟搬家,对不起! :0)

标签: wordpress footer sidebar


【解决方案1】:

找到了我需要的东西。样式表需要添加这个来停止浮动:

.site-info {
clear: both
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-10
    • 2014-05-16
    • 2016-01-12
    • 2019-01-16
    • 2010-12-14
    • 1970-01-01
    • 1970-01-01
    • 2021-08-25
    相关资源
    最近更新 更多