Adding additional Widgets V2

WARNING!

Please note that guides are just that, guides. Concerning customization guides we cannot assist with implementation at the one on one level and you instead may wish to hire a web pro for hands-on assistance.

Warning: This is not for everyone. CyberChimps takes no responsibility issues caused when working with this code and the support does not cover PHP.  This code has been tested to work.

 

Here is a child theme with a few additional different sized widgets.

You can download it from here.

The widgets can be then inserted in many places either by editing the single files and adding.

<?php get_sidebar('single-widget'); ?>
<?php get_sidebar('double-widget'); ?>
<?php get_sidebar('quadruple-widget'); ?>

Another way that I like is to use action hooks. You can see the different hooks here. So the code will be added to the functions.php

<?php
// Add single widgets to every page just after closing </div><!-- end of #wrapper -->
function responsive_child_include_single_widget(){
    get_sidebar('single-widget');
}
add_action('responsive_wrapper_end', 'responsive_child_include_single_widget');

?>

 

 

Categories: