Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eri-trabiccolo/c17629195d5416859da2 to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/c17629195d5416859da2 to your computer and use it in GitHub Desktop.
Add a full width widget area before customizr colophon
/*add widget area between footer widgets and colophon */
add_filter( 'tc_default_widgets' , 'add_footer_colophon_widget' );
function add_footer_colophon_widget( $defaults ) {
$defaults['fc_widgets'] = array(
'name' => __( 'Footer Colophon Widget' , 'customizr' ),
'description' => __( 'Widget Area Before Colophon' , 'customizr' )
);
return $defaults;
}
add_action('__footer' , 'display_my_fc_widget', 11 );
function display_my_fc_widget() {
echo '<div class="footer-colophon">';
dynamic_sidebar('fc_widgets');
echo '</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment