Skip to content

Instantly share code, notes, and snippets.

@2ndkauboy
Last active February 28, 2016 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 2ndkauboy/4d6c78f0d917b666f6e5 to your computer and use it in GitHub Desktop.
Save 2ndkauboy/4d6c78f0d917b666f6e5 to your computer and use it in GitHub Desktop.
<?php
function twentyfifteen_parent_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'twentyfifteen_parent_enqueue_styles' );
function twentyfifteen_footer_sidebar_widgets_init() {
register_sidebar( array(
'name' => __( 'Footer Sidebar 1', 'twentyfifteen-footer-sidebar' ),
'id' => 'footer-sidebar-1',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
register_sidebar( array(
'name' => __( 'Footer Sidebar 2', 'twentyfifteen-footer-sidebar' ),
'id' => 'footer-sidebar-2',
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h2 class="widget-title">',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'twentyfifteen_footer_sidebar_widgets_init', 11 );
/**
Theme Name: TwentyFifteen with Footer Sidebar
Template: twentyfifteen
*/
.site-footer .site-info:after {
content: " ";
display: table;
clear: both;
margin-bottom: 20px;
}
.site-footer .footer-sidebar {
margin: 0;
max-width: 300px;
width: 47%;
}
.site-footer .footer-sidebar-left {
float: left;
}
.site-footer .footer-sidebar-right {
float: right;
}
.site-footer .footer-sidebar aside {
margin: 0;
padding: 0;
}
/**
* 16.1 Mobile Large 620px
*/
@media screen and (max-width: 620px) {
.site-footer .footer-sidebar {
float: none;
max-width: 100%;
width: 100%;
margin-bottom: 20px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment