suhiminain
8/30/2018 - 6:12 AM

Change Genesis Footer Widget To 4 Columns / Class

change the number of widgets in footer and add class.

<?php

// Add support for 4-column footer widgets
add_theme_support( 'genesis-footer-widgets', 4 ); 

// 4 is number of columns of the footer widget.

//* Add column class to each of the Genesis Footer Widgets 
//* https://gist.github.com/hellofromtonya/5ea51a6ee899e99bc04c
//* https://gist.github.com/studiopress/5700003  (genesis framework default column class)

add_filter('genesis_footer_widget_areas', 'add_columns_to_footer_widgets',10, 2);
function add_columns_to_footer_widgets($output,$footer_widgets){
    $output = str_replace('footer-widget-area', 'footer-widget-area one-fourth', $output);
    $output = str_replace('footer-widgets-1 footer-widget-area one-fourth', 'footer-widget-1 footer-widget-area one-fourth first', $output);
    return $output;
}