Hi, congratulations on creating a great theme!
Im eager to add a fourth column to my footer. Is there a way of adding a fourth footer widget to the theme?
Hi, congratulations on creating a great theme!
Im eager to add a fourth column to my footer. Is there a way of adding a fourth footer widget to the theme?
Hi @chris001,
I hope you are well today and thank you for your question.
You can try achieving this by using the attached custom child theme of Sparkling theme that contains some custom code.
Best Regards,
Movin
Hi @Movin,
Thanks for reverting so quickly and for your guidance!
One quick question - we have already customised our Child Theme Style sheet - with this, could you please offer some guidance on which code we should copy and paste out of your style sheet into ours so we don’t overwrite all of our changes?
And in terms of outcomes - will a Footer Widget 4 display in the Appearance > Widgets page?
Thanks again for all of your help!
Best,
Chris
One quick question – we have already customised our Child Theme Style sheet – with this, could you please offer some guidance on which code we should copy and paste out of your style sheet into ours so we don’t overwrite all of our changes?
First of all add the attached sidebar-footer.php file in your child theme directory and then add the following code in the functions.php file of your child theme.
function custom_sparkling_widgets_init(){
register_sidebar(array(
'id' => 'footer-widget-4',
'name' => esc_html__( 'Footer Widget 4', 'sparkling' ),
'description' => esc_html__( 'Used for footer widget area', 'sparkling' ),
'before_widget' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<h3 class="widgettitle">',
'after_title' => '</h3>',
));
}
add_action( 'widgets_init', 'custom_sparkling_widgets_init', 99 );
And in terms of outcomes – will a Footer Widget 4 display in the Appearance > Widgets page?
Yes
You are most welcome here
You are always welcome here