如何将页脚区域更改为具有三个小部件区域?
Reactor主题有一个页脚小部件区域。如果添加了多个小部件,它将分为三列,但我发现很难与使用的三个以上的小部件相平衡。因此,我尝试将其更改为页脚中的三个小部件区域。
我以前做过这件事,但并没有像Reactor处理所有这些函数、挂钩、动作和东西那样展开主题。无论如何,我尝试过在两个文件中更改代码,并将其放在这里:
http://pastebin.com/MA4nrPBq
我想在我的管理区域获得三个页脚小部件,但不想在我的页面上。我想我有正确的代码可以编辑,但我如何编辑代码才能继续?
谢谢
马丁
下面是我正在尝试的代码:
//In sidebars.php
if ( in_array( \'footer\', $sidebars[0] ) ) {
$footer = \'<div id="%1$s" class="widget top-bar-widget \';
$footer .= \'large-\' . reactor_get_widget_columns(\'sidebar-footer-01\'); //Added -01
$footer .= \' columns %2$s">\';
register_sidebar( array(
\'name\' => __(\'Footer 01\', \'reactor\'), //Added 01
\'id\' => \'sidebar-footer-01\', //Added -01
\'description\' => \'Footer widget area\',
\'class\' => \'\',
\'before_widget\' => $footer,
\'after_widget\' => \'</div>\',
\'before_title\' => \'<h4 class="widget-title">\',
\'after_title\' => \'</h4>\',
) );
}
if ( in_array( \'footer\', $sidebars[0] ) ) {
$footer = \'<div id="%1$s" class="widget top-bar-widget \';
$footer .= \'large-\' . reactor_get_widget_columns(\'sidebar-footer-02\'); //Added -02
$footer .= \' columns %2$s">\';
register_sidebar( array(
\'name\' => __(\'Footer 02\', \'reactor\'), //Added 02
\'id\' => \'sidebar-footer-02\', //Added -02
\'description\' => \'Footer widget area\',
\'class\' => \'\',
\'before_widget\' => $footer,
\'after_widget\' => \'</div>\',
\'before_title\' => \'<h4 class="widget-title">\',
\'after_title\' => \'</h4>\',
) );
}
//The above code is just a copy of Reactor code. I just added the 01, 02 and did it 4 times.
//In sidebar-footer.php
<?php if ( is_active_sidebar(\'sidebar-footer\') ) : ?>
<div class="row">
<div class="<?php reactor_columns( 12 ); ?>">
<div id="sidebar-footer" class="sidebar" role="complementary">
<?php dynamic_sidebar(\'sidebar-footer-01\'); ?> //Added -01
<?php dynamic_sidebar(\'sidebar-footer-02\'); ?> //Added line
<?php dynamic_sidebar(\'sidebar-footer-03\'); ?> //Added line
</div><!-- #sidebar-footer -->
</div><!--.columns -->
</div><!-- .row -->
<?php endif; ?>