admin管理员组文章数量:1130349
It's showing widgets.php:
Not showing customizer:
sidebar.php
function footer_sidebar()
{
register_sidebar(
array(
'name' => __( 'Footer Sidebar 1', 'footer1' ),
'id' => 'footer1',
'description' => __( 'Footer Sidebar 1', 'footer1' ),
'before_widget' => '<div id="footer1" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
register_sidebar(
array(
'name' => __( 'Footer Sidebar 2', 'footer2' ),
'id' => 'footer2',
'description' => __( 'Footer Sidebar 2', 'footer2' ),
'before_widget' => '<div id="footer2" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
}
add_action( 'widgets_init', 'footer_sidebar' );
footer.php
<div class="row">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer1') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer2') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer3') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer4') ) : ?><?php endif; ?>
</div>
It's showing widgets.php:
Not showing customizer:
sidebar.php
function footer_sidebar()
{
register_sidebar(
array(
'name' => __( 'Footer Sidebar 1', 'footer1' ),
'id' => 'footer1',
'description' => __( 'Footer Sidebar 1', 'footer1' ),
'before_widget' => '<div id="footer1" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
register_sidebar(
array(
'name' => __( 'Footer Sidebar 2', 'footer2' ),
'id' => 'footer2',
'description' => __( 'Footer Sidebar 2', 'footer2' ),
'before_widget' => '<div id="footer2" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
}
add_action( 'widgets_init', 'footer_sidebar' );
footer.php
<div class="row">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer1') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer2') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer3') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer4') ) : ?><?php endif; ?>
</div>
Share
Improve this question
edited Feb 11, 2016 at 22:16
Howdy_McGee♦
20.9k24 gold badges91 silver badges177 bronze badges
asked Feb 11, 2016 at 22:07
Yakup SeymenYakup Seymen
293 bronze badges
2
|
2 Answers
Reset to default 2You have to put the function footer_sidebar() in the file functions.php not sidebar.php
Is the footer.php included on site you opened the customizer?
You might be forgotten to add wp_footer(); function before the closing body tag in your footer.php. That causes the javascript cannot finish its instruction in the customizer.
It's showing widgets.php:
Not showing customizer:
sidebar.php
function footer_sidebar()
{
register_sidebar(
array(
'name' => __( 'Footer Sidebar 1', 'footer1' ),
'id' => 'footer1',
'description' => __( 'Footer Sidebar 1', 'footer1' ),
'before_widget' => '<div id="footer1" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
register_sidebar(
array(
'name' => __( 'Footer Sidebar 2', 'footer2' ),
'id' => 'footer2',
'description' => __( 'Footer Sidebar 2', 'footer2' ),
'before_widget' => '<div id="footer2" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
}
add_action( 'widgets_init', 'footer_sidebar' );
footer.php
<div class="row">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer1') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer2') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer3') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer4') ) : ?><?php endif; ?>
</div>
It's showing widgets.php:
Not showing customizer:
sidebar.php
function footer_sidebar()
{
register_sidebar(
array(
'name' => __( 'Footer Sidebar 1', 'footer1' ),
'id' => 'footer1',
'description' => __( 'Footer Sidebar 1', 'footer1' ),
'before_widget' => '<div id="footer1" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
register_sidebar(
array(
'name' => __( 'Footer Sidebar 2', 'footer2' ),
'id' => 'footer2',
'description' => __( 'Footer Sidebar 2', 'footer2' ),
'before_widget' => '<div id="footer2" class="col-md-4" style="margin-bottom:10px;margin-top:-25px;">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
)
);
}
add_action( 'widgets_init', 'footer_sidebar' );
footer.php
<div class="row">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer1') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer2') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer3') ) : ?><?php endif; ?>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('footer4') ) : ?><?php endif; ?>
</div>
Share
Improve this question
edited Feb 11, 2016 at 22:16
Howdy_McGee♦
20.9k24 gold badges91 silver badges177 bronze badges
asked Feb 11, 2016 at 22:07
Yakup SeymenYakup Seymen
293 bronze badges
2
- Have you tried this? – TheDeadMedic Commented Feb 13, 2016 at 18:13
-
Remember to add wp_head() before
</header>tag and wp_footer() before</body>tag. It works for but I had the same problem. – Daniel Szantar Commented Jan 4, 2019 at 20:30
2 Answers
Reset to default 2You have to put the function footer_sidebar() in the file functions.php not sidebar.php
Is the footer.php included on site you opened the customizer?
You might be forgotten to add wp_footer(); function before the closing body tag in your footer.php. That causes the javascript cannot finish its instruction in the customizer.
本文标签: widgetsSidebar not show customizer
版权声明:本文标题:widgets - Sidebar not show customizer! 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749043292a2307473.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


</header>tag and wp_footer() before</body>tag. It works for but I had the same problem. – Daniel Szantar Commented Jan 4, 2019 at 20:30