douxing9567 2016-11-21 18:44
浏览 225

编辑Wordpress页脚小部件

I'm currently working on a Wordpress site, using the Rhythm theme - it's default template has four columns built into the footer, and I'd like to only have three.

So in my child theme, I went into the widget section and removed a column from the php code, so it looks like this:

if (ts_get_opt('footer-widgets-enable') == 1): ?>
<!-- Divider -->
<hr class="mt-0 mb-0"/>
<!-- End Divider -->

<!-- Widgets Section -->
<section class="footer-sidebar page-section">
    <div class="container relative">
        <div class="row multi-columns-row">
            <div class="col-sm-8 col-md-4 col-lg-4">
                <?php if (is_active_sidebar( ts_get_custom_sidebar('footer-1', 'footer-sidebar-1') )): ?>
                    <?php dynamic_sidebar( ts_get_custom_sidebar('footer-1', 'footer-sidebar-1') ); ?>
                <?php endif; ?>
            </div>
            <div class="col-sm-8 col-md-4 col-lg-4">
                <?php if (is_active_sidebar( ts_get_custom_sidebar('footer-2', 'footer-sidebar-2') )): ?>
                    <?php dynamic_sidebar( ts_get_custom_sidebar('footer-2', 'footer-sidebar-2') ); ?>
                <?php endif; ?>
            </div>
            <div class="col-sm-8 col-md-4 col-lg-4">
                <?php if (is_active_sidebar( ts_get_custom_sidebar('footer-3', 'footer-sidebar-3') )): ?>
                    <?php dynamic_sidebar( ts_get_custom_sidebar('footer-3', 'footer-sidebar-3') ); ?>
                <?php endif; ?>
            </div>
        </div>
    </div>
</section>
<!-- End Widgets Section -->

The problem I'm having is that the page is still referencing the code with four columns instead. So I'm guessing my issue is in my footer.php file, or the template-parts.php file and that it's not pointing to the proper file.

My biggest concern is that I didn't set up my child theme correctly, and now the coding is trying to reference two different themes.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 2024-五一综合模拟赛
    • ¥15 如何将下列的“无限压缩存储器”设计出来
    • ¥15 下图接收小电路,谁知道原理
    • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
    • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
    • ¥15 手机接入宽带网线,如何释放宽带全部速度
    • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
    • ¥15 ETLCloud 处理json多层级问题
    • ¥15 matlab中使用gurobi时报错
    • ¥15 这个主板怎么能扩出一两个sata口