-
-
Save glyons/1b537ea30cd633641e8fbfd7cb081b32 to your computer and use it in GitHub Desktop.
Hamilton Theme - Add Widget Support (Add to the top of each PHP file)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Need to add CSS styling --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Footer Widgets | |
* | |
*/ | |
function footerL_widgets_init() { | |
register_sidebar( array( | |
'name' => 'Footer Left', | |
'id' => 'footer_left', | |
'before_widget' => '<div class="footer-widget">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="rounded">', | |
'after_title' => '</h2>', | |
) ); | |
} | |
add_action( 'widgets_init', 'footerL_widgets_init' ); | |
function footerC_widgets_init() { | |
register_sidebar( array( | |
'name' => 'Footer Centre', | |
'id' => 'footer_centre', | |
'before_widget' => '<div class="footer-widget">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="rounded">', | |
'after_title' => '</h2>', | |
) ); | |
} | |
add_action( 'widgets_init', 'footerC_widgets_init' ); | |
function footerR_widgets_init() { | |
register_sidebar( array( | |
'name' => 'Footer Right', | |
'id' => 'footer_right', | |
'before_widget' => '<div class="footer-widget">', | |
'after_widget' => '</div>', | |
'before_title' => '<h2 class="rounded">', | |
'after_title' => '</h2>', | |
) ); | |
} | |
add_action( 'widgets_init', 'footerR_widgets_init' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment