Add a four widget area not working
-
Website : https://www.lescarnetsdemickeline.com
Problem : error message
Wordpress version : WordPress 4.9.4 avec le thème Customizr Pro.Hi eveyrone ??
I follow the step on this tuto to add a four widget area on my footer :
https://presscustomizr.com/snippet/adding-fourth-footer-widget-area/But …. at the end, i have this error message when i edit my function.php file :
( i edit the file on my wordress dashboard in apearence, edit )Cannot redeclare my_footer_widgets() (previously declared in wp-content/themes/customizr-pro/functions.php:49)
I dont understand what’s wrong? Can you help me with that?
here the text i copy/paste:
// Adds a widget area. It gets registered automatically as part of the arra add_filter( 'tc_footer_widgets', 'my_footer_widgets'); function my_footer_widgets( $default_widgets_area ) { $default_widgets_area['footer_four'] = array( 'name' => __( 'Footer Widget Area Four' , 'customizr' ), 'description' => __( 'Just use it as you want !' , 'customizr' ) ); return $default_widgets_area; } // Style all the footer widgets so they take up the right space add_filter( 'footer_one_widget_class', 'my_footer_widget_class'); add_filter( 'footer_two_widget_class', 'my_footer_widget_class'); add_filter( 'footer_three_widget_class', 'my_footer_widget_class'); add_filter( 'footer_four_widget_class', 'my_footer_widget_class'); function my_footer_widget_class() { return 'span3'; } // Adds a widget area. It gets registered automatically as part of the arra add_filter( 'tc_footer_widgets', 'my_footer_widgets'); function my_footer_widgets( $default_widgets_area ) { $default_widgets_area['footer_four'] = array( 'name' => __( 'Footer Widget Area Four' , 'customizr' ), 'description' => __( 'Just use it as you want !' , 'customizr' ) ); return $default_widgets_area; } // Adds a class to style footer widgets add_filter( 'footer_four_widget_class', 'my_footer_widget_class'); function my_footer_widget_class() { return 'span12'; }
Thanks a lot
The page I need help with: [log in to see the link]
- The topic ‘Add a four widget area not working’ is closed to new replies.