Footer в теме Appointment Blue
Прошу помочь с разметкой футера. Тема Appointment. По умолчанию в sidebars.php (themes/appointment/functions/widgets/sidebars.php) авторами темы присвоено col-md-3 вместо нужных col-md-6 (необходимо две колонки). Если изменить в sidebars.php у
родительской темы значение на col-md-6, то все становится на свои места, но хотелось бы само собой в дочерней все зарегистрировать, в связи с чем к Вам и обращаюсь. Тема Appointment Blue так сама является дочерней от темы Appointment.
Часть кода sidebars.php родительской темы
<?php
add_action( 'widgets_init', 'appointment_widgets_init');
function appointment_widgets_init() {
/*sidebar*/
....
register_sidebar( array(
'name' => __( 'Footer widget area', 'appointment' ),
'id' => 'footer-widget-area',
'description' => __('Footer widget area', 'appointment' ),
'before_widget' => '<div class="col-md-3 col-sm-6 footer-widget-column">',
'after_widget' => '</div>',
'before_title' => '<h3 class="footer-widget-title">',
'after_title' => '</h3>',
) );
....
Код footer.php дочерней темы
<!-- Footer Section -->
<?php
$appointment_options=theme_setup_data();
$footer_setting = wp_parse_args( get_option( 'appointment_options', array() ), $appointment_options );
if ( is_active_sidebar( 'footer-widget-area' ) ) { ?>
<div class="footer-section">
<div class="container">
<div class="row footer-widget-section">
<?php dynamic_sidebar( 'footer-widget-area' ); } ?>
<div class="clearfix"></div>
</div>
</div>
</div>
<!-- /Footer Section -->
<div class="clearfix"></div>
<!-- Footer Copyright Section -->
<div class="footer-copyright-section">
<div class="container">
<div class="row">
<div class="col-md-8">
<div class="footer-copyright">
<a href="http://wsdagency.com/">© Агентство по разработке веб-решений, 2017</a>
</div>
</div>
<?php if($footer_setting['footer_social_media_enabled'] == 0 ) {
$footer_facebook = $footer_setting['footer_social_media_facebook_link'];
$footer_twitter = $footer_setting['footer_social_media_twitter_link'];
$footer_linkdin = $footer_setting['footer_social_media_linkedin_link'];
$footer_googleplus = $footer_setting['footer_social_media_googleplus_link'];
$footer_skype = $footer_setting['footer_social_media_skype_link'];
?>
<div class="col-md-4">
<ul class="footer-contact-social">
<?php if($footer_setting['footer_social_media_facebook_link']!='') { ?>
<li class="facebook"><a href="<?php echo esc_url($footer_facebook); ?>" <?php if($footer_setting['footer_facebook_media_enabled']==1){ echo "target='_blank'"; } ?> ><i class="fa fa-facebook"></i></a></li>
<?php } if($footer_setting['footer_social_media_twitter_link']!='') { ?>
<li class="twitter"><a href="<?php echo esc_url($footer_twitter); ?>" <?php if($footer_setting['footer_twitter_media_enabled']==1){ echo "target='_blank'"; } ?> ><i class="fa fa-twitter"></i></a></li>
<?php } if($footer_setting['footer_social_media_linkedin_link']!='') { ?>
<li class="linkedin"><a href="<?php echo esc_url($footer_linkdin); ?>" <?php if($footer_setting['footer_linkedin_media_enabled']==1){ echo "target='_blank'"; } ?> ><i class="fa fa-linkedin"></i></a></li>
<?php } if($footer_setting['footer_social_media_googleplus_link']!='') { ?>
<li class="googleplus"><a href="<?php echo esc_url($footer_googleplus); ?>" <?php if($footer_setting['footer_googleplus_media_enabled']==1){ echo "target='_blank'"; } ?> ><i class="fa fa-google-plus"></i></a></li>
<?php } if($footer_setting['footer_social_media_skype_link']!='') { ?>
<li class="skype"><a href="<?php echo esc_url($footer_skype); ?>" <?php if($footer_setting['footer_skype_media_enabled']==1){ echo "target='_blank'"; } ?> ><i class="fa fa-skype"></i></a></li>
<?php } ?>
</ul>
</div>
<?php } ?>
</div>
</div>
</div>
<!-- /Footer Copyright Section -->
<!--Scroll To Top-->
<a href="#" class="hc_scrollup"><i class="fa fa-chevron-up"></i></a>
<!--/Scroll To Top-->
<?php wp_footer(); ?>
</body>
</html>
Код functions.php дочерней темы
<?php
add_action( 'wp_enqueue_scripts', 'appointment_blue_theme_css',999);
function appointment_blue_theme_css() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'bootstrap-style', get_template_directory_uri() . '/css/bootstrap.css' );
wp_enqueue_style( 'theme-menu', get_template_directory_uri() . '/css/theme-menu.css' );
wp_enqueue_style( 'default-css', get_stylesheet_directory_uri()."/css/default.css" );
wp_enqueue_style( 'element-style', get_template_directory_uri() . '/css/element.css' );
wp_enqueue_style( 'media-responsive', get_template_directory_uri() . '/css/media-responsive.css');
wp_dequeue_style( 'appointment-default', get_template_directory_uri() .'/css/default.css');
}
/*
* Let WordPress manage the document title.
*/
function appointment_blue_setup() {
add_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'appointment_blue_setup' );
?>
Спасибо